UIS = game:GetService("UserInputService")
local Seat = script.Parent -- Path to seat
Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
if Seat.Occupant ~= nil then
local Char = Seat.Occupant.Parent
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.W then
while task.wait() do -- a loop
game.Workspace.TrainKit1.Base.AssemblyLinearVelocity = script.Parent.CFrame.LookVector*-15
end
while task.wait() do -- a loop
game.Workspace.TrainKit2.Base.AssemblyLinearVelocity = script.Parent.CFrame.LookVector*-15
end
end
end)
end
end)
COMMUNITY QUESTION
Why would this script when trying to run a tram system I made not work?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.
