I'm having a bit of trouble with a command

Before you go, I have another question.

I receive this error

What part of the code is line 15 now?

I meant to post it. The forum is being weird for some reason.

target.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.Jail.Teleporter.Position)

You could use target.Character:WaitForChild('HumanoidRootPart').CFrame instead, usually helps if the script is loaded before the instance you’re looking for.

2 Likes

I got the same error. Only with ‘WaitForChild’

is it .WaitForChild() or :WaitForChild()? it is a common error that happens, using the period instead of two period character

It’s :WaitForChild(). I’m not sure what’s wrong though.

target is just a string is it not? You haven’t gotten the player instance.

Is it ok if you resend the script as it is now? That’d help us look for the issues

1 Like

Might also be this, as @Polendris says. Perhaps you used target as a string there

1 Like

Screen Shot 2020-12-23 at 12.48.05 PM

I just fixed it as soon as you sent that. I changed the line to this (I cant even tell what I did):

workspace:WaitForChild(target).HumanoidRootPart.CFrame = CFrame.new(workspace.Jail.Teleporter.Position)