Hi, i am trying to make a script where only 1 player can get this morph. Heres my script:
My code block is broken :
local RS = game:GetService(“ServerStorage”)
local Players = game:GetService(“Players”)
while true do
wait(0.1)
if script.Parent.Name == “skeletonpiratejack” then
local ah = RS.StarterCharacter:Clone()
ah.Parent = workspace
local laam = script.Parent
local breh = Players:GetPlayerFromCharacter(laam)
breh.Character = ah
wait(300000000)
end
end
and Heres the result:
I need to know why the camera isnt following the character and how to do the “1 player only character” morph correctly.
Help appreciated!
local RS = game:GetService(“ServerStorage”)
local Players = game:GetService(“Players”)
while true do
wait(0.1)
if script.Parent.Name == “skeletonpiratejack” then
local ah = RS.StarterCharacter:Clone()
ah.Parent = workspace
local laam = script.Parent
local breh = Players:GetPlayerFromCharacter(laam)
breh.Character = ah
wait(0.1)
game.ReplicatedStorage.SetCamera:FireClient(breh,laam.Humanoid)
wait(300000000)
end
end
localscript(i put it in starterplayercharacter) :
local Event = game.ReplicatedStorage:WaitForChild(“SetCamera”)
Event.OnClientEvent:Connect(function(humanoid)
workspace.CurrentCamera.CameraSubject = humanoid
end)
local RS = game:GetService(“ReplicatedStorage”)
local Players = game:GetService(“Players”)
while true do
wait(0.1)
if script.Parent.Name == “skeletonpiratejack” then
local ah = RS.StarterCharacter:Clone()
ah.Parent = workspace
local laam = script.Parent
local breh = Players:GetPlayerFromCharacter(laam)
breh.Character = ah
wait(0.1)
game.ReplicatedStorage.SetCamera:FireClient(breh,laam.Humanoid)
wait(300000000)
end
end