|
| 27 Jun 2015 11:19 PM |
There is something that needs to be added in this script. This script is put in a seat. This script is supposed to give the player a certain tool. The problem is that whenever I sit on the seat, which gives me the seat, the tool does not work, however, it works in Roblox studio. I was told to add "wait(1)" to the script. Where would I add this?
function Seated(theSeated) dude = game.Players:playerFromCharacter(theSeated.Part1.Parent) if dude ~= nil then thing2 = script.Parent.Turret1212:clone() thing2.Parent = dude.Backpack thing2.Vehicle.Value = script.Parent.Parent end end
function UNSeated(theSeated) dude = game.Players:playerFromCharacter(theSeated.Part1.Parent) if dude ~= nil then if dude.Backpack:findFirstChild("Turret1212") ~= nil then dude.Backpack:findFirstChild("Turret1212").Active = false dude.Backpack:findFirstChild("Turret1212"):remove() end end end
script.Parent.ChildAdded:connect(Seated) script.Parent.ChildRemoved:connect(UNSeated)
~ Klaus Blitzenstein, Chairman of the Righteous Supremacy Party |
|
|
| Report Abuse |
|