script.Parent.MouseButton1Click:connect(function()
game.Players.LocalPlayer.CharacterAppearanceId = 149574052
local Pos = game.Players.LocalPlayer.Character:GetPrimaryPartCFrame()
game.Players.LocalPlayer:LoadCharacter()
game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(Pos)
if game.Players.LocalPlayer.Character:FindFirstChild("ForceField") then
game.Players.LocalPlayer.Character["ForceField"]:Destroy()
end
end)
I want them to click a ImageButton and it puts them as the player id I choose then it respawns them, i got it working but only in studio and it said something about the back end server in output and dev console

5 comments
Make sure the script is a LocalScript.
And can you paste down your script, so I can see?
Provide the error
Hit
Edit Questionand format your code in Lua Code blockWhat is the error?