I can't find a reason why my script won't work. I want to wait until player spawns to start the intro, but it's not working! Here's my script and please tell me what I did wrong. P.S., this is a local script.
local parent = script.Parent local back = script.Parent.Behind local parent = script.Parent local welcome1 = script.Parent.Text1 local char = game.Players.LocalPlayer:WaitForChild("Character") ----Music---- ID = '170758880' Looped = true -- Set to false if you want non-looped music. Music=Instance.new("Sound" ,parent) Music.Name = "Music" if Looped == true then Music.Looped = true end Music.SoundId = "http://roblox.com/asset/?id=170758880" Music.Volume = 1 Music:Play() ----For Statments---- wait(0.6) if char.Loaded == true then for i = 1, 0, 0.02 do welcome1.TextTransparency = i wait() wait(0.9) for l = 0, 1, 0.02 do welcome1.TextTransparency = l end end end
Character isn't a child of player, it's a property. This is how you access it:
--// Local Script local plr = game.Players.LocalPlayer local char = plr.Character
If you want to MAKE SURE the char variable has the character, use this:
--// Local Script local plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:Wait()