of     1   

MUTCD
#184543684Monday, February 29, 2016 7:05 PM GMT

timer = 40 while wait() do repeat wait() until script.Parent.isCountingDown.Value repeat script.Parent.Parent.DespawnTimer.Gui.Text.Visible = true timer = timer - 1 script.Parent.Parent.DespawnTimer.Gui.Text.Text = "Despwning in "..timer.." seconds" if timer == 0 then script.Parent.Parent.Parent:Remove() end wait(1) until not script.Parent.isCountingDown.Value script.Parent.Parent.DespawnTimer.Gui.Text.Visible = false timer = 40 end It works perfectly as intentioned in studio, but when I run in test server, it counts down despawn regardless of the vehicle being locked or not
Game_Design
#184543720Monday, February 29, 2016 7:06 PM GMT

Is it a localscript or a Script
ThomasChabot
#184543747Monday, February 29, 2016 7:07 PM GMT

It probably has something to do with whatever is setting the isCountingDown value What script is changing that? http://www.roblox.com/Gretzky-item?id=369637787
MUTCD
#184543882Monday, February 29, 2016 7:11 PM GMT

@Game_Design Script @Wayne_Gretzky GUI = script.Parent.Screen script.Parent.ChildAdded:connect(function(child) script.Parent.inCar.Value = true if child:IsA("Weld") then child.C0 = CFrame.new(0,-0.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player if child.Part1.Name == "HumanoidRootPart" then player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) script.Parent.isCountingDown.Value = false if player.Name ~= script.Parent.Owner.Value and script.Parent.Owner.Value ~= "" and script.Parent.CarLocked.Value then print("unauthorized car access") end if player and (not player.PlayerGui:FindFirstChild("Screen")) then --// The part after the "and" prevents multiple GUI's to be copied over. GUI.CarSeat.Value = script.Parent --// Puts a reference of the seat in this ObjectValue, now you can use this ObjectValue's value to find the car directly. GUI:Clone().Parent = player.PlayerGui --// Compact version end end end end) script.Parent.ChildRemoved:connect(function(child) script.Parent.inCar.Value = true if child:IsA("Weld") then if child.Part1.Name == "HumanoidRootPart" then script.Parent.Parent.Parent.RWD.Throttle = 0 script.Parent.Parent.Parent.RWD.Torque = 10 script.Parent.Parent.Parent.LW.VS.Throttle = 0 script.Parent.Parent.Parent.LW.VS.Torque = 10 script.Parent.Parent.Parent.RW.VS.Throttle = 0 script.Parent.Parent.Parent.RW.VS.Torque = 10 script.Parent.Sound.Pitch = 0 if not script.Parent.CarLocked.Value then script.Parent.isCountingDown.Value = true end player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) if player and player.PlayerGui:FindFirstChild("Screen") then player.PlayerGui:FindFirstChild("Screen"):Destroy() end end end end)
Game_Design
#184543926Monday, February 29, 2016 7:12 PM GMT

Where is the script stored? Try putting Prints around the script to see what is happening, and if it even starts at the first.
MUTCD
#184544112Monday, February 29, 2016 7:17 PM GMT

@Game_Design In a VehicleSeat, the script setting the locked value is in a ScreenGui but I gave the GUI a value to refer to the seat The values are changing like they should even on server, but the Despawn script seems to ignore it
Game_Design
#184544219Monday, February 29, 2016 7:21 PM GMT

Like I said, print out a bunch to see where it stops.
MUTCD
#184544325Monday, February 29, 2016 7:24 PM GMT

I set a print in the locking script Prints Locked Was supposed to get "Car not locked, starting count down", but didn't (Gui giver script) Gets out of car, nothing happens and car continues on counting down
MUTCD
#184546945Monday, February 29, 2016 8:34 PM GMT

bump
MUTCD
#184548634Monday, February 29, 2016 9:12 PM GMT

b2
MUTCD
#184566234Tuesday, March 01, 2016 1:56 AM GMT

b3
MUTCD
#184595674Tuesday, March 01, 2016 7:02 PM GMT

I figured out my problem, it was FilteringEnabled this whole time *facepalm*
Duckmitri
#184597043Tuesday, March 01, 2016 7:37 PM GMT

Nice

    of     1