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

Why does this only work in studio?

Asked by 8 years ago

This only works in Studio why is that? I tried putting a WaitForChild that made it not work at all, same with a Local Script.

amount = 350 cash = script.Parent band = script.Parent.Parent.Band click = script.Parent.ClickDetector

function onClick(player)

cash.Transparency = 1
band.Transparency = 1
click.MaxActivationDistance = 0

player.leaderstats.Money.Value = player.leaderstats.Money.Value + amount wait (300) cash.Transparency = 0 band.Transparency = 0 click.MaxActivationDistance = 10 end

script.Parent.ClickDetector.MouseClick:connect(onClick)

Local Script does not make it work either, the script is inside a part called Money there are 2 bricks in a model (Band and Money) everything is inside Money even the ClickDetector I am getting no Errors in game on ServerConsole

0
Format your entire script, not just a part of it. TheDeadlyPanther 2460 — 8y

Answer this question