--How I can make it going to front even without stopping just on key w (i mean, no one press and it is going, I need it like in cars, you have to push it to work)?
My script code is:

local trammodel = script.Parent.Parent.Parent local tramwheels = trammodel.TramChasis local driving = false local seat = false local Player = game.Players.LocalPlayer local mouse = Player:GetMouse()

--POLISH VERSION WHAT TO DO: -- DO ZROBIENIA: -- ogarn?? cframe modelu
-- ogarn?c przycisk s (cofanie b?d? hamowanie) -- ogarn?? je?d?enie po torach

while true do function PressW(key) if (key == "W") then wait(10) driving = true for i = 1,400 do trammodel:SetPrimaryPartCFrame(trammodel:GetPrimaryPartCFrame() * CFrame.new(0,0,1)) wait(0.1) end end end end

--while true do -- script.Parent.Touched:Connect(function(hit) -- if hit.Parent then -- local player = game.Players:GetPlayerFromCharacter(hit.Parent) -- if hit.Parent:FindFirstChild('Humanoid') then -- hit.Parent.Humanoid.Seated:connect(function (active, seat,pressw) -- if player ~= nil then -- if active == true and seat == script.Parent and pressw == true then -- end -- end -- end -- end) -- end -- end -- end) --end PressW()




4 comments

0

what do u mean

0

also naming your function wont actually do what the functions name is, you need to connect a event

0

What's with this pre class?

0

Lol, pretty sure ROBLOX doesn't support HTML in games, but just RLua or sometimes Json.