I found this script and used it, but I want it in ClickDetector and not Mouse1Click or MouseEnter. This is the script:
plr = script.Parent.Parent.Parent.Parent script.Parent.MouseEnter:connect(function() script.Parent.TextStrokeTransparency=0 end) script.Parent.MouseLeave:connect(function() script.Parent.TextStrokeTransparency=1 end) script.Parent.MouseButton1Down:connect(function() local coordinats = plr.Character.Torso.CFrame plr:LoadCharacter(true) plr.Character.Torso.CFrame = coordinats local stuff = plr.Character:GetChildren() for i = 1,#stuff do if stuff[i].ClassName=="ForceField" then stuff[i]:Remove() end end end)
Let me see what I can do here...
--I can't do anything about the Hovering Events... Sorry. script.Parent.MouseClick(function(plr) --Change MouseButton1Down to MouseClick, add plr to the parenthesis after function, since the function can take the player property of who clicked it. if plr ~= nil and plr.Character:FindFirstChild("Torso") then --Trying to protect the script from breaking, having the script check if the player still exists, and that the Torso is still around. local coordinats = plr.Character.Torso.CFrame plr:LoadCharacter(true) --Alright, I look at the API for this, I guess it means if LoadCharacter(InGame) is set to true then it will load your new character appearance as opposed to the old one, it's not really necessary to have this portion of the method. plr.Character.Torso.CFrame = coordinats --I am not sure if the server will have enough time to respond after that respawn, if it does not teleport the player add a wait function before it. local stuff = plr.Character:GetChildren() for i = 1,#stuff do if stuff[i].ClassName=="ForceField" then stuff[i]:Remove() end end end end)
If you have any questions about the script, let me know in the comments section.
I kind of wish people would stop downvoting others without even giving reason, it's happened to me in that past numerous times and one time five of my top rated answers were downvoted by a troll. At least have the common courtesy to give a reason for a down vote people. Thank you.