I have a Script that lets you start with a certain camera position, doesn't let you move, and lets you move again when you press "play"
It gives an error message at line 20 saying that Character is not a valid member of Players How do I fix this?
The play button script:
script.Parent.MouseEnter:connect(function()
for i = 1, 10 do
script.parent.BorderSizePixel = script.Parent.BorderSizePixel +1
wait(0.01)
end
end)
script.Parent.MouseLeave:connect(function()
for i = 1, 10 do
script.parent.BorderSizePixel = script.Parent.BorderSizePixel -1
wait(0.01)
end
end)
script.Parent.MouseButton1Down:connect(function()
script.parent.Visible = false
script.Parent.Parent.Parent.StartLock.Disabled = true
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
local plr = script.Parent.Parent.Parent.Parent.Parent.Parent
plr.Character.Humanoid.PlatformStand = false
plr.Character.MoveTo(game.Workspace.Baseplate.Position)
plr.Character.Torso.Anchored = false
plr.Character.Humanoid.PlatformStand = false
end)
while true do
if script.parent.BorderSizePixel > 11 then script.parent.BorderSizePixel = 11
end
wait(0.1)
end
The you can't move script:
local Player = game.Players.LocalPlayer
local Cam = workspace.CurrentCamera
local Target = Player.Character.Torso
Cam.CameraType = Enum.CameraType.Scriptable
Cam.CameraSubject = Player.Character.Torso
while true do
Cam.CoordinateFrame = CFrame.new(Target.Position) * CFrame.Angles(0,3.2,0) * CFrame.new(-2,0,5)
wait(0.1)
end
All of these scripts are located in playerGUI
And the play button script is located in a gui called "Startgui"
I really don't understand what's wrong, please help

4 comments
well then fix your plr variable like I told you
Now it gives the error expected '.' not ':' calling member function MoveTo
that's because you used character.MoveTo() instead of character:MoveTo()
Thanks man, you're my hero! :)