#This wont change the color of the Tank's lights on the back on and off
245 messages · Page 1 of 1 (latest)
how
eng = script.Parent.Parent.Engine
seat = script.Parent
speed = 20
torque = 1000000
for i,v in script.Parent.Parent.Body:GetChildren() do
if v:FindFirstChild("CylindricalConstraint") then
v.CylindricalConstraint.MotorMaxTorque = torque
end
end
eng.sound:Play()
while wait() do
throttle = seat.Throttle
steer = seat.Steer
for i,v in script.Parent.Parent.Body:GetChildren() do
if v.Name == "LeftWheel" then
v.CylindricalConstraint.AngularVelocity = throttle * speed
if steer ~= 0 then
v.CylindricalConstraint.AngularVelocity = steer * speed/4 + (throttle*speed/2)
end
elseif v.Name == "RightWheel" then
v.CylindricalConstraint.AngularVelocity = -throttle * speed
if steer ~= 0 then
v.CylindricalConstraint.AngularVelocity = steer * speed/4 + (-throttle*speed/2)
end
end
end
function onKeyDown(input)
local key = input.KeyCode.Name
if key == nil then return end
key = key:lower()
if key == 'W' then
game.Parent.Parent.Body.LightHolder1.Light1.SurfaceLight = false
game.Parent.Parent.Body.LightHolder2.Light2.SurfaceLight = false
game.Parent.Parent.Body.LightHolder1.Light1.BrickColor = BrickColor.new("Black")
game.Parent.Parent.Body.LightHolder2.Light2.BrickColor = BrickColor.new("Black")
end
if key == 'S' then
game.Parent.Parent.Body.LightHolder1.Light1.SurfaceLight = true
game.Parent.Parent.Body.LightHolder2.Light2.SurfaceLight = true
game.Parent.Parent.Body.LightHolder1.Light1.BrickColor = BrickColor.new("Really red")
game.Parent.Parent.Body.LightHolder2.Light2.BrickColor = BrickColor.new("Really red")
end
if steer ~= 0 or throttle ~= 0 then
eng.sound.pitch.Octave = 1.1
else
eng.sound.pitch.Octave = 1
end
end
end
thanks
WHAT THE FUCK DOES THE IMAGE SHOW YOU
OMG
yeah im not helping you
bye
why
`
I CAN SHARE SCREEN IF WE CAN GET IN A CALL 😭
PLEASE THIS IS KILLING ME
IS IT HARD
AN IDIOT CAN DO THIS HOLY FUCK
THANK YOU OMG A COMPETENT PERSON
YOU ASS
BRO I SWEAR TO GOD THESE PEOPLE AREN'T REAL
LIKE GENUINELY
EITHER THEY'RE A BOT OR THEY'RE UNDERAGED CUS THEY CAN'T FUCKING COMPREHEND WHAT'S BEING SPOONFED TOLD TO THEM
`eng = script.Parent.Parent.Engine
seat = script.Parent
speed = 20
torque = 1000000
for i,v in script.Parent.Parent.Body:GetChildren() do
if v:FindFirstChild("CylindricalConstraint") then
v.CylindricalConstraint.MotorMaxTorque = torque
end
end
eng.sound:Play()
while wait() do
throttle = seat.Throttle
steer = seat.Steer
for i,v in script.Parent.Parent.Body:GetChildren() do
if v.Name == "LeftWheel" then
v.CylindricalConstraint.AngularVelocity = throttle * speed
if steer ~= 0 then
v.CylindricalConstraint.AngularVelocity = steer * speed/4 + (throttlespeed/2)
end
elseif v.Name == "RightWheel" then
v.CylindricalConstraint.AngularVelocity = -throttle speed
if steer ~= 0 then
v.CylindricalConstraint.AngularVelocity = steer * speed/4 + (-throttle*speed/2)
end
end
end
function onKeyDown(input)
local key = input.KeyCode.Name
if key == nil then return end
key = key:lower()
if key == 'W' then
game.Parent.Parent.Body.LightHolder1.Light1.SurfaceLight = false
game.Parent.Parent.Body.LightHolder2.Light2.SurfaceLight = false
game.Parent.Parent.Body.LightHolder1.Light1.BrickColor = BrickColor.new("Black")
game.Parent.Parent.Body.LightHolder2.Light2.BrickColor = BrickColor.new("Black")
end
if key == 'S' then
game.Parent.Parent.Body.LightHolder1.Light1.SurfaceLight = true
game.Parent.Parent.Body.LightHolder2.Light2.SurfaceLight = true
game.Parent.Parent.Body.LightHolder1.Light1.BrickColor = BrickColor.new("Really red")
game.Parent.Parent.Body.LightHolder2.Light2.BrickColor = BrickColor.new("Really red")
end
if steer ~= 0 or throttle ~= 0 then
eng.sound.pitch.Octave = 1.1
else
eng.sound.pitch.Octave = 1
end
end
end`
happy?
no
hes a fucking idiot
HE DID A SINGULAR ` AND DID THAT FOR EACH GOD DAMN LINE
HES DUMBER THAN YOU THINK
*nvm he did just a singluar
*not for every line
bro
local IDIOT = @Robuster13
I dont use this often
balls
local IDIOT = game.Idiots.Robuster13
???
local IDIOT = game.Idiots.Robuster13
buddy
what's happening over there 💀
imcompetency
They being hostile to me for not adding `
WARRRRRRRRRRRRRRRRRR
we're hostile cus you don't understand the concept of pressing a button thrice
Like BRUH I JUST TOLD YOU ITS MY FIRST TIME?? 😭 🙏
like BRUH THERES A GIF SHOWING YOU EXACTLY WHAT TO FUCKING DO
I DONT SEE IT ON MY KEYBOARD
NEVER SAW IT?
ITS THE FUCKING FIRST MESSAGE IN THIS THREAD
i love war
YOU NEVER SAW IT MY ASS
chaos
sad
I think rubi is overreacting rn
I didnt see it cause I was focused on getting an image
FUCK NO
but anyways
IM UNDERREACTING RN
How do it 😭
im gonna hold your hand when i say this
look at the fucking diagram
lemme send a better image
aint no way
what are you trying to do?
are you serious
use god damn code blocks
like this in the lua language
just copy paste into lua editor
no 🤦
its a valuable ass skill
G E N T L Y*
he get mad he can't do it
This is just the damn code
im fucking done
THE FUCK IS A DIAGRAM
chill out rubi its ok
you suck
uh
game.parent.parent is fucking wild
local it
STRIATP YOU SEE WHAT I MEAN HES AN IDIOT
you meant script, not game right?
OH
And?
nah those emoji
that was not the point
the point was to make things fucking easier to read by using code blocks
still dont work
since your -3 braincells can't comprehend the task of typing ` 3 times
you're an idiot
local it like
local car = script.parent
so when there is multiple objects same name
you use the one you localed
SHUT UP
real
@leaden bison @chilly surge can you guys just get out of here since your "help" is not needed, just shut up and let him learn how to code. I bet the first times you were coding you were even worse
alright thanks
atleast i could use code blocks
let me write that real quick
Ok but go
did you help at all
You're definitely an idiot acting like that
Yes, and with you yapping that's a struggle to help him
the only way things get through to people is to yell at them
No you idiot
this isnt the army moron
sigh
wait
@shell dagger you can come in my dms if you want
our society is getting dumber
im helping him
shhhhhhhhhhhhh
Hold on
Yeah 💀
shut up
to the left of your [ 1 ] key
ez
im out of here
i've lost my patience
@shell dagger you're still not a real person
exactly
Im a very real person 🔥
@chilly surge
its in a model
and the part is in another part
I just want it so that if u press the key it turns it on and off
color/light activation
he clearly doesn't have any of thos-
Hypocrite
ok so, making script under models
dawg what
bro my disvord keeps having lag spikes
is faster than local thier position like what folder they in
I cant even see what im typing 😭
I know some basic coding
All I need to know is why it aint changing the color when I pressed "W" and "S"
seat huh?
yea
the code is inside the seat
and the seat is inside the model
which the lights are inside the model
hence why I did "Script.Parent.parent"
@chilly surge
I want it so that if you move backwards it turns on but forward it turns off
ok
let me just
make sure it trigger function now
i forgot
how use
local seat = script.Parent.VehicleSeat
local light = script.Parent.light
local function lightCtrl(on_off)
if on_off == true then
light.Material = Enum.Material.Neon
light.BrickColor = BrickColor.new("Really red")
elseif on_off == false then
light.Material = Enum.Material.SmoothPlastic
light.BrickColor = BrickColor.new("Black")
end
end
seat:GetPropertyChangedSignal("Throttle"):Connect(function()
print("Throttle input:", seat.Throttle)
if seat.Throttle == -1 then
lightCtrl(true)
elseif seat.Throttle == 0 then
lightCtrl(false)
elseif seat.Throttle == 1 then
lightCtrl(false)
end
end)
and yes
Thanks!
also I can modify it a bit to change light color expose thing
dont repeat like a idiot
wdym
** You are now Level 10! **
new one?
ye
Can I share screen and you tell me how
