I just finished making my Snowboard move and I welded myself to the board so I can ride the board but instead, the board quits moving and now suddenly I’m in control. How could I fix this?
Video.
https://gyazo.com/ebcf31db329f3ae5891ebd237e14e5e1
Script.
local ProximityPromptService = game:GetService("ProximityPromptService")
local player = game.Players.LocalPlayer
local MovementControl = game.Workspace.DevSnowboard.MovementControl
local DevBoardRoot = game.Workspace.DevSnowboard.DevSnowboard
local function onPromptTriggered(promptObject, player)
MovementControl.Transparency = 0
if promptObject.Name == "DevSnowboard" then
print(player.Name.. " mounted Dev board")
--welding--
local character = player.Character
if character then -- double check that the character exists
local RightFoot = character:FindFirstChild("HumanoidRootPart")
local weld = Instance.new("Weld")
weld.Part0 = RightFoot
weld.Part1 = DevBoardRoot
weld.Parent = script.Parent.Parent
wait(.5)
script.Parent:Destroy()
end
end
end
ProximityPromptService.PromptTriggered:Connect(onPromptTriggered)