Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

What is wrong with my code?

Asked by 9 years ago

The addition and subtraction of the torque works, but the gui's frame doesn't shrink.

local Player = script.Parent.Parent.Parent.Parent.Parent
local mouse = Player:GetMouse()
local v =script.Parent.X
v.Value= script.Parent.Size.X.Offset
local f = script.Parent.Size.X.Offset
--game.Workspace.Part1.Position = Vector3.new(game.Workspace.BasePlate) 
local m = game.Players.LocalPlayer:GetMouse() 
function kiss(m)
if m:lower() == string.char(48) then
if v.Value == 0 then
end
if v.Value>0 then
game.Workspace.Muscle.VehicleSeat.Torque = game.Workspace.Muscle.VehicleSeat.Torque + 15
game.Workspace.Muscle.Muffler.Fire.Enabled = true 
game.Workspace.Muscle.Muffler2.Fire.Enabled = true 
while(v == true)do
local i = 1
wait()
script.Parent.Size = UDim2.new(0,f-i,0,15)
end
end
if v.Value <= 0 then 
script.Parent.X.Value = 0
end
end
end
function bite(n)
if n:upper() == string.char(48)then
game.Workspace.Muscle.VehicleSeat.Torque = game.Workspace.Muscle.VehicleSeat.Torque - 15
game.Workspace.Muscle.Muffler.Fire.Enabled = false
game.Workspace.Muscle.Muffler2.Fire.Enabled = false
while(v == true)do
local i = 1
wait()
script.Parent.Size = UDim2.new(0,f+i,0,15)
if v.Value >= 200 then 
script.Parent.X.Value = 200
end
end
end
end
m.KeyUp:connect(bite)
m.KeyDown:connect(kiss)

0
Also the output isn't showing any problems zekey101 0 — 9y

Answer this question