This worked before but I’m not sure why it doesn’t anymore. I hadn’t added any scripts or anything since.
Basically, I have a GUI for morphs where when you press the morph button it sends the camera to a camera part in a room with these morphs, where you can then press a button to go back and fourth between the characters using the set camera position parts. I finally got the movement to work but now when you select morph it gets stuck on the screen. It DOES morph your character but when setting the camera to custom, it doesn’t set it in game. I’ve tried adding it to the head, the humanoid, even moving it back and fourth between the movement and morph script but nothing has worked.
CAMERA MOVEMENT SCRIPT:
local ts=game:GetService"TweenService"
local tinfo=TweenInfo.new(.5,Enum.EasingStyle.Back,Enum.EasingDirection.Out)
local camera=workspace.CurrentCamera
local camFolder=workspace.MorphLobby.CameraPositions
local previousButton=script.Parent.Parent.Previous --path to the pervious button
local MenuButton=script.Parent.Parent.Parent.Frame.PhoneOn.App1 --path to the MenuButton
local NextButton=script.Parent --path to the nextbutton
local EquipButton=script.Parent.Parent.Catnap.Morph -- path to the equip button
local ExitButton=script.Parent.Parent.Catnap.Morph--path to the exit button
local value=0
local rigs={ --if cam 1 is for rig1 then write the name of the rig1 in [1] index
[1]="Catnap",
[2]="Dogday",
[3]="Hoppy",
[4]="Bobby",
[5]="Kickin",
[6]="Bubba",
[7]="Picky",
[8]="Crafty"
}
MenuButton.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = true
script.Parent.Parent.Parent.Frame.Visible = false
camera.CameraType=Enum.CameraType.Scriptable
ts:Create(camera,tinfo,{CFrame=camFolder:FindFirstChild("1").CFrame}):Play()
end)
NextButton.MouseButton1Click:Connect(function()
value+=1
if value>8 then value=1 end
ts:Create(camera,tinfo,{CFrame=camFolder:FindFirstChild(value).CFrame}):Play()
print(rigs[value])
end)
previousButton.MouseButton1Click:Connect(function()
value-=1
if value<1 then value=8 end
ts:Create(camera,tinfo,{CFrame=camFolder:FindFirstChild(value).CFrame}):Play()
print(rigs[value])
end)
ExitButton.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
script.Parent.Parent.Parent.Frame.Visible = true
camera.CameraType=Enum.CameraType.Custom
end)
MORPH SCRIPT:
script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.CharChange:FireServer(game.ReplicatedStorage.Morphs.Catnap)
local cc = workspace.CurrentCamera
local CameraPart = workspace.CameraPart
cc.CameraSubject = game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
cc.CameraType = Enum.CameraType.Custom
end)
As started before these have been edited back and fourth multiple times before I just gave up and called it a day. Figured I’d try again and ask for help so some stuff may still be there that shouldn’t. I’d appreciate the help.
I will also mention that setting the camera to custom manually in studio when testing, the morph is there at least and works (the camera stays in place while the character moves but I mean thats expected since I didn’t set it to the player manually), so everything works fine except moving the camera back to the player when morphed.