Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

(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

0
Maybe you could weld the part to the player and remove it after 2 seconds? WaddelsG 69 — 5y
0
H O W Theroofypidgeot 21 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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

Ad

Answer this question