So this script works, but since its only referencing my name, it only works for me. How would i make this script work for every player that joins? My main account on Roblox is Imaginevreything (Every purposely misspelled), so that makes the script ony work for me.
local function OnClick(player) game.Workspace.imaginevreything.HAND.Transparency = 0 game.Workspace.imaginevreything.OK.Transparency = 1 wait(3) game.Workspace.imaginevreything.HAND.Transparency = 1 game.Workspace.imaginevreything.OK.Transparency = 0 end print("DONE HOZAY") script.Parent.ClickDetector.MouseClick:connect(OnClick)
Since the ClickDetector returns the Player who clicked it you should do the following:
function onClick(player) player.Character --<And so on> -- "player" references the player who clicked the part end