I'm new to scripting and I am trying to make a teleportation script, but I don't know how to reach the character on line 19. It says, "Head is not a valid member of Workspace." Please help.
button = script.Parent.buttonframe.TextButton
gui = script.parent.Frame
telebutton = gui["tele to red"]
platform = game.Workspace.teleplatform
gui.Visible = false
button.MouseButton1Down:connect(function()
if gui.Visible == false then
gui.Visible = true
else
gui.Visible = false
end
end)
telebutton.MouseButton1Down:connect(function()
if gui.Visible == true then
game.Workspace.Head.CFrame = target.CFrame*CFrame.new("-16.139, 4.048, 42.141")
end
end)

79 comments
Thanks for replying! How do I incorporate this into the script though? I am even more confused lol
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, what you're defining a thing, try and use :WaitForChild() more often.
So uh, when you're defining a thing, try and use :WaitForChild() more often.