Now the problem is I cant use :LoadCharacter() in a LocalScript so I would have to call a remote event but then you can't access player from a global script How do I fix???

Here are the scripts:

script 1 (LocalScript)

script.Parent.MouseButton1Click:connect(function(Player)
	game.Players.LocalPlayer.TeamColor = BrickColor.new("Forest green")
	game.Players.LocalPlayer.Character.Humanoid.Health = 0
	game.ReplicatedStorage.Change:FireServer()
end)

Script 2 (GlobalScript)

game.ReplicatedStorage.Change.OnServerEvent:connect(function()
	game.Players.LocalPlayer:LoadCharacter()
end)

2 comments

0

I've had this problem before. I don't believe load character works in LocalScripts.

0

cant get localplayer in regular scripts