Advertisement
rblxstudioscriptss

Roblox Studio Respawn button tutorial

Nov 23rd, 2022
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. --Respawn Button Tutorial for Roblox Studio 2022-- (this is a remake, since i knew it was an instant respawn for my other script)
  2. 1. Right Click anywhere on the screen. Then a GUI Called "insert object" will show. Search "Model" Then click on the Plus Sign. Search "Part" then click on it (I dont know if it will work tho)
  3.  
  4. 2. Put a ClickDetector in the Part (if you dont know how put your mouse on the object and click the plus symbol)
  5.  
  6. 3. Name the ClickDetector "Click" (This is optional. You dont need to put a name or put if you want)
  7.  
  8. 4. Insert a "Script" in the part
  9.  
  10. 5. Copy and paste the script (Test this and see if it works)
  11.  
  12. local a = script.Parent.Parent.Cart:Clone
  13. local deb = false
  14.  
  15. function chng()
  16. if deb == true then return end
  17. deb = true
  18. local new = a:clone()
  19. new.Parent = script.Parent.Parent
  20. new:MakeJoints()
  21. script.Parent.BrickColor = BrickColor.new(21)
  22. wait()
  23. script.Parent.BrickColor = BrickColor.new(28)
  24. deb = false
  25. end
  26.  
  27. script.Parent.Click.MouseClick:Connect(chng)
  28.  
  29. 6. After that, Close the script. Then add the thing you want for respawning
  30. 7. Insert it in the Model.
  31. (Note: I dont think it will work with cars)
  32. Try and see if it works:)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement