I made a gui that you can click and changes you into another character, it works on Roblox Studio playtest but when you join the actual game on roblox website your camera is scuffed. It makes no errors so I'm confused
First here is the local script in the gui
local Characters = game:GetService("ReplicatedStorage").Characters
local Event = game:GetService("ReplicatedStorage").ChooseCharacter
for i,v in pairs (script.Parent:GetChildren()) do
if v:IsA("TextButton") or v:IsA("ImageButton") then
v.MouseButton1Click:connect(function()
if Characters:FindFirstChild(v.Name) then
Event:FireServer(v.Name)
elseif v.Name == "PlayerCharacter" then
Event:FireServer("PlayerCharacter")
end
end)
end
end
and here is the script in serverscriptservice
local Characters = game:GetService("ReplicatedStorage").Characters
local Event = game:GetService("ReplicatedStorage").ChooseCharacter
Event.OnServerEvent:connect(function(player,character)
if character == "PlayerCharacter" then
player:LoadCharacter()
else
local char = Characters[character]:Clone()
local humapos = player.Character.HumanoidRootPart.Position
char.Name = player.Name
player:LoadCharacter()
player.Character = char
player.Character.Parent = workspace
wait(.025)
player.Character.HumanoidRootPart.Position = humapos
end
end)
here is a picture https://imgur.com/a/iPvYolF here is another picture of what its like in the game https://imgur.com/a/6Lxl6SC Please help, if you answer I will immediately accept your answer (if it works)

4 comments
Can you send a pic showing what it looks like when you play the actual game?
k
done
hi agent, can you send me a link to the game?