It morphs me fine but then respawns me after so long what could be the problem? It had Upper Torso, LowerTorso and humanoid I have no idea why it keeps respawning me.
–Local Script
plyr = game.Players.LocalPlayer
Modified the script’s variables and readability, please use codeblocks next time.
-- Local Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = game.Players.LocalPlayer; repeat wait() until player.Character
local character = player.Character
local camera = workspace.CurrentCamera
local button = workspace:WaitForChild("button")
local abutton = button:WaitForChild("button")
local cd = abutton:WaitForChild("transform")
local event = ReplicatedStorage:WaitForChild(“MechEvent”)
cd.MouseClick:Connect(function()
event:FireServer()
local mech = workspace:WaitForChild(player.Name .. "Mech")
camera.CameraSubject = mech.UpperTorso
end)
-- Server
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local event = ReplicatedStorage:WaitForChild("MechEvent")
local mech = ReplicatedStorage:WaitForChild("StarterCharacter")
event.OnServerEvent:Connect(function(player)
local mech2 = mech:Clone()
mech2.Name = player.Name .. "Mech"
mech2.Parent = workspace
player.Character = mech2
end)
No scripting error was detected. It was probably character issues as aforementioned by the author(or OP).
@Raretendoblox You don’t need to include it to the title. Just mark the solution on one of the replies.