Hi, I’m trying to make a big statue of a dummy transform into a player’s character when the player joins. It doesn’t work though as it gives the error: Players.Chickennuggetmanwow.PlayerScripts.LocalMap:11: attempt to index nil with 'WaitForChild' - Client
And without waiting for child:
Players.Chickennuggetmanwow.PlayerScripts.LocalMap:13: attempt to index nil with 'SetPrimaryPartCFrame' - Client
Here’s my code:
local Players = game:GetService("Players")
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Statue = workspace.Statue.Char
function StatueAppearance()
local CharacterMorph = Character:Clone()
CharacterMorph:SetPrimaryPartCFrame(Statue.PrimaryPart.CFrame)
Statue.Character = CharacterMorph
CharacterMorph.Parent = workspace
end
StatueAppearance()
Also another issue is in the editor, the dummy is fine, but when I load the game it’s body parts spread out and get tiny. Anybody know how to fix any of this? Thanks, ahead of time.