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

How to script with moving players and what words to use?

(asking for a friend)

I am scripting with a player, So I wondered,how can I make a player stick inside a part, even if the part moves. And then make it stop after 2 seconds?

I'd like to know the words I need to make this script, You can give me the script, But I will also try to make it myself

Thanks for your help, if you can help

2 comments

0

Maybe you could weld the part to the player and remove it after 2 seconds?

0

H O W

1 answer

define your part and define your time length part cannot be a model, must be a part


game.Players.PlayerAdded:Connect(function(p)
  local char = workspace:FindFirstChild(p.Name)
  local part = script.Parent -- part
  local time = 2 -- amount of time
  place = CFrame.new(part.Position) -- Where you want the player to go on touched
repeat wait(1) time = time - 1 char.Torso.CFrame = place until time < 1
end)

this may not work since i didnt test it, if it doesnt work then tell me.

if you are using r15 then change char.Torso to char.UpperTorso

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