`local ExFie = game:GetService("Players").LocalPlayer
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function()
local GUI = ExFie.PlayerGui.Spown
local SuTart = game:GetService("ReplicatedStorage").SuTart
local Jebus = SuTart:Clone()
Jebus.Name = "SuTart"
local Stuff = Jebus:GetChildren()
local Player = ExFie
Player.Character:ClearAllChildren()
for i,v in pairs(Stuff) do
local Holy = v
Holy.Parent = Player.Character
end
Player.Character.PrimaryPart = Player.Character.HumanoidRootPart
GUI.Enabled = false
end)`
IDK what wrong help me
The reason it doesn't work is server can't access local player, it has to be passed it by the client so I would change your remote event to have the parameter of player which is automatically passed by fireclient .
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(ExFie) local GUI = ExFie.PlayerGui.Spown local SuTart = game:GetService("ReplicatedStorage").SuTart local Jebus = SuTart:Clone() Jebus.Name = "SuTart" local Stuff = Jebus:GetChildren() local Player = ExFie ...
Basically remove the delcaring of your variable at the top and make it the parameter of your function