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

why dose the skatebord fly when i press the button?

Asked by 3 years ago
Edited 3 years ago

so i have this script thats inside a gui to spawn a skateboard. it works but when i use it the board dosnt spawn in front of me on me or really anywhere near me. and when i move my character it dosnt change the spawn location either

board = script.Parent.Station:Clone() "refers to the skateboard and clones it"
pos = script.Parent.Parent.Parent.Parent.Character.Torso.Position "gets torso position"
npos = pos + Vector3.new(0,0,0) "spawn position is ment to be five studs in front of torso"
script.Parent.MouseButton1Click:Connect(function()
    board.PrimaryPart.CFrame = CFrame.new(npos) "sets position"
    board.Parent = game.Workspace "puts the cloned board into the workspace"
end)

Answer this question