#This wont change the color of the Tank's lights on the back on and off

245 messages · Page 1 of 1 (latest)

leaden bison
#
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
shell dagger
#

thanks

leaden bison
#

OMG

#

yeah im not helping you

#

bye

shell dagger
#

why

leaden bison
#

JESUS FUCKING CHRIST

#

THE IMAGE CANNOT MAKE IT ANY MORE CLEAR

chilly surge
#

`

shell dagger
#

I CAN SHARE SCREEN IF WE CAN GET IN A CALL 😭

chilly surge
#

JUST

#

`

#

``

shell dagger
#

PLEASE THIS IS KILLING ME

chilly surge
#

IS IT HARD

shell dagger
#

''e''

#

didnt work

#

'e'

chilly surge
#

YOU FOOL

#

3

#

`

shell dagger
#

WHADDA DO

#

IM JUST TIRED MAN

leaden bison
chilly surge
#

NOT " ' ITS `

leaden bison
chilly surge
#

YOU ASS

leaden bison
#

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

shell dagger
#

`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?

chilly surge
#

oh my god

#

bruh

#

ADD LUA

leaden bison
#

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

shell dagger
#

dawg

#

This is like the first time Im using this

chilly surge
#
local IDIOT = @Robuster13
shell dagger
#

I dont use this often

chilly surge
leaden bison
#

i did not upload a gif to tenor.com just for this to be the case with people

chilly surge
#

balls

leaden bison
#

local IDIOT = game.Idiots.Robuster13

shell dagger
leaden bison
#
local IDIOT = game.Idiots.Robuster13
chilly surge
leaden bison
#

smh

shell dagger
leaden bison
#

like i said

#

hes not real

hollow summit
#

what's happening over there 💀

chilly surge
#

w

#

war

#

no reason

leaden bison
shell dagger
#

They being hostile to me for not adding `

chilly surge
#

WARRRRRRRRRRRRRRRRRR

leaden bison
shell dagger
#

Like BRUH I JUST TOLD YOU ITS MY FIRST TIME?? 😭 🙏

leaden bison
chilly surge
shell dagger
leaden bison
#

IF YOU HAVE THESE THINGS CALLED.... wait for it...

#

EYES?????

leaden bison
#

ITS THE FUCKING FIRST MESSAGE IN THIS THREAD

chilly surge
#

i love war

leaden bison
#

YOU NEVER SAW IT MY ASS

chilly surge
#

chaos

shell dagger
hollow summit
#

I think rubi is overreacting rn

shell dagger
#

I didnt see it cause I was focused on getting an image

leaden bison
hollow summit
#

but anyways

leaden bison
#

IM UNDERREACTING RN

shell dagger
leaden bison
#

look at the fucking diagram

shell dagger
#

lemme send a better image

chilly surge
hollow summit
#

what are you trying to do?

chilly surge
#

are you serious

leaden bison
#
like this in the lua language
hollow summit
leaden bison
hollow summit
#

if they don't use code blocks

#

or gently tell them

leaden bison
hollow summit
#

G E N T L Y*

leaden bison
#

me show diagram

#

he ignore diagram

shell dagger
leaden bison
#

he get mad he can't do it

shell dagger
#

This is just the damn code

leaden bison
leaden bison
#

ok

chilly surge
#

what is

#

game.parent.parent

shell dagger
#

THE FUCK IS A DIAGRAM

leaden bison
#

chill out rubi its ok

shell dagger
#

which stores the u know parts

chilly surge
#

you suck

hollow summit
shell dagger
#

First time scripting

leaden bison
#

game.parent.parent is fucking wild

chilly surge
#

local it

leaden bison
#

STRIATP YOU SEE WHAT I MEAN HES AN IDIOT

hollow summit
#

you meant script, not game right?

shell dagger
#

OH

hollow summit
chilly surge
shell dagger
#

buddy this is my first time coding??

#

I don't know much???

leaden bison
#

that was not the point

#

the point was to make things fucking easier to read by using code blocks

shell dagger
#

still dont work

leaden bison
#

since your -3 braincells can't comprehend the task of typing ` 3 times

#

you're an idiot

chilly surge
#

local it like

local car = script.parent

so when there is multiple objects same name

#

you use the one you localed

#

SHUT UP

shell dagger
#

real

hollow summit
#

@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

leaden bison
shell dagger
#

let me write that real quick

leaden bison
#

and no

#

im not an idiot

hollow summit
leaden bison
chilly surge
hollow summit
hollow summit
leaden bison
chilly surge
#

@shell dagger get in channel 2

#

i will live

shell dagger
#

this isnt the army moron

chilly surge
#

studio upgrade

leaden bison
#

sigh

chilly surge
#

wait

hollow summit
#

@shell dagger you can come in my dms if you want

leaden bison
#

our society is getting dumber

chilly surge
#

shhhhhhhhhhhhh

shell dagger
#

Hold on

chilly surge
hollow summit
leaden bison
chilly surge
leaden bison
#

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

shell dagger
#

Im a very real person 🔥

leaden bison
#

tf is "exactly" supposed to mea- nvm

#

idgas

shell dagger
#

@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

chilly surge
#

ok u wait

#

you need understand

#

parents

#

they are important

leaden bison
chilly surge
#

STFU

#

N-

shell dagger
chilly surge
#

ok so, making script under models

leaden bison
shell dagger
#

bro my disvord keeps having lag spikes

chilly surge
#

is faster than local thier position like what folder they in

shell dagger
#

I cant even see what im typing 😭

shell dagger
#

All I need to know is why it aint changing the color when I pressed "W" and "S"

chilly surge
#

seat huh?

shell dagger
#

yea

shell dagger
#

and the seat is inside the model

#

which the lights are inside the model

#

hence why I did "Script.Parent.parent"

shell dagger
#

I want it so that if you move backwards it turns on but forward it turns off

chilly surge
#

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

chilly surge
#

use function like i did

#

true/false

shell dagger
#

also I can modify it a bit to change light color expose thing

chilly surge
#

dont repeat like a idiot

shell dagger
#

k

#

!

#

Thanks so much bro!

chilly surge
#

Throttle is abandomed tho

shell dagger
#

how do I insert this?

chilly surge
#

wdym

pale crownBOT
#

studio** You are now Level 10! **studio

chilly surge
#

new one?

shell dagger
#

ye

shell dagger
chilly surge
#

not pretty sure

#

watch vid about that

shell dagger
#

now it aint drivin

chilly surge
#

skill issue

#

understand how it works

#

dont just copy