Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My Teleportation Script Is Not Working? Even after fixing typos?

I already have my script and it looks like this but it still doesnt seem to work?

ReplicatedStorage = game:GetService("ReplicatedStorage")
Status = ReplicatedStorage.StatusValue


script.Parent.Text = Status.Value
Status.Changed:connect(function()
script.Parent.Text = Status.Value
end)

I already put a StringValue inside ReplicatedStorage and this script inside a text label in starterGui I put this script below in workspace so I dont know whats not working?

ReplicatedStorage = game:GetService("ReplicatedStorage")
Status = ReplicatedStorage.StatusValue

for i = 300,1,-1 do -- Change 15 to how long you want to countdown
  Status.Value = i
   wait(1)
end

for _. player in pairs(game.Players:GetPlayers()) do
    player.Character.Torso.CFrame = CFrame.new(Spawn.Location) -- If you are loading a map then put a brick called **Spawn ** if not either put the position of a brick or 'game.Workspace.Brick.Position'
end

end

This script still doesn't work I dont know whats not working with it. I put a brick in workspace and named it Spawn.

Maybe I spelled some stuff wrong please test your script before you comment your script below

2 comments

0

On the 2nd script, you just put down Spawn.Location... Try this instead: player.Character.Torso.CFrame = workspace.Spawn.CFrame

0

Don't do position when working with CFrame. Vector3 and CFrame are 2 different things.

1 answer

Your first script works fine, but not the second one. I will point out the errors in the edited one below:

ReplicatedStorage = game:GetService("ReplicatedStorage")
Status = ReplicatedStorage.StatusValue

while true do -- Is this an infinite loop? I think you forgot to add the statement.

for i = 300,1,-1 do -- Change 15 to how long you want to countdown
  Status.Value = i
   wait(1)
end

for _, player in pairs(game.Players:GetPlayers()) do -- Did you add a "." instead of "," by accident?
    player.Character.Torso.CFrame = CFrame.new(Spawn.Position) -- I tried CFrame but it doesn't work, so using Position is fine.
end

-- The script continues...
end

You need to be careful the next time you script. Try to check each chunk of code before testing the game. If you have any problems, please leave a comment below. Thank you and I hope this will help you.

This discussion is preserved as it was. New answers, comments, and votes are closed.