-
What do you want to achieve? Keep it simple and clear!
So i need script work. -
What is the issue? Include screenshots / videos if possible!
For some reason script just do nothing. I added prints, but script still do nothing. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I added a lot of prints, but didn’t help.
Script:
local MainPart = script.Parent.Parent.MainPart
local Player = game.Players.LocalPlayer
local FactoryBrokenValue = game.Players.LocalPlayer.PlayerGui.PlrStats.FactoryBroken
local Money = game.Players.LocalPlayer.leaderstats.Money
local Bricks = game.Players.LocalPlayer.leaderstats.Bricks
local DB = true
local MoneyLevel = script.Parent.Parent.Parent.MoneyLevel
local SpeedLevel = script.Parent.Parent.Parent.SpeedLevel
local Brick = game.Workspace.Factory1.Brick
while FactoryBrokenValue == false do
print("FactoryBrokenValue false!")
local BrickClone = Brick:Clone()
BrickClone.Parent = game.Workspace.Factory1.Brick
BrickClone.Transparency = 0
BrickClone.Anchored = false
BrickClone.CanCollide = true
if BrickClone.Position == Vector3.new(42.434, 10.789, -336.925) then
print("Brick Position is right!")
Bricks.Value = Bricks.Value + (1 * MoneyLevel)
BrickClone:Destroy()
print("Brick destroyed!")
end
wait(SpeedLevel)
end
print("Smth Wrong")
A location of script:
(P.S. I clone entire model to workspace)