Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Morph GUI camera is scuffed? Why?

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

0

Can you send a pic showing what it looks like when you play the actual game?

0

k

0

done

0

hi agent, can you send me a link to the game?

1 answer

✓ Accepted answer

Hello, I am not 100% sure what's going wrong here but you can confirm the camera type is custom by having this script:

-- MAKE SURE TO PUT THIS SCRIPT IN A LOCALSCRIPT AND IN STARTERPACK!!!

local Camera = workspace.CurrentCamera

while true do
  Camera.CameraType = Enum.CameraType.Custom
  wait()
end

This code makes sure that your camera is the default roblox camera "custom"

This discussion is preserved as it was. New answers, comments, and votes are closed.