Hi! I have a gui thats given to the player when they die. The gui is a basic play button that when pressed (should) respawn the player and hide the gui. However, the button does nothing when pressed? Can someone please help ASAP! Thank You!
Script In Gui:
local player = game.Players.LocalPlayer
local playbutton = script.Parent.ClearFrame.PlayButton
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(character)
playbutton.MouseButton1Click:Connect(function()
script.Parent.ClearFrame.Visible = false
game.ReplicatedStorage.CharLoad:FireServer(player)
end)
end)
end)
Script In ServerScriptService:
game.ReplicatedStorage.CharReLoad.OnServerEvent:Connect(function(player)
player:LoadCharacter()
end)
