I Have this script & Local script of a tool, It’s working on PC But not on mobile.
What is wrong? Please help, thank you!
Script:
emitter = script.Parent.Muzzle.Emitter
function turnOn()
emitter.Pink.Enabled = true
emitter.Green.Enabled = true
emitter.Yellow.Enabled = true
emitter.Blue.Enabled = true
emitter.White.Enabled = true
emitter.Sound.Playing = true
end
function turnOff()
emitter.Pink.Enabled = false
emitter.Green.Enabled = false
emitter.Yellow.Enabled = false
emitter.Blue.Enabled = false
emitter.White.Enabled = false
emitter.Sound.Playing = false
end
script.Parent.Fire.OnServerEvent:Connect(function(ply, fire)
if fire then
turnOn()
else
turnOff()
end
end)
Local Script:
emitter = script.Parent.Muzzle.Emitter
function turnOn()
emitter.Pink.Enabled = true
emitter.Green.Enabled = true
emitter.Yellow.Enabled = true
emitter.Blue.Enabled = true
emitter.White.Enabled = true
emitter.Sound.Playing = true
script.Parent.Fire:FireServer(true)
end
function turnOff()
emitter.Pink.Enabled = false
emitter.Green.Enabled = false
emitter.Yellow.Enabled = false
emitter.Blue.Enabled = false
emitter.White.Enabled = false
emitter.Sound.Playing = false
script.Parent.Fire:FireServer(false)
end
script.Parent.Activated:Connect(turnOn)
script.Parent.Deactivated:Connect(turnOff)
script.Parent.Unequipped:Connect(turnOff)