i Was Trying To Make A Pile Of Sand Go To A Different Place Every Time You Press In It But It Doesnt Work It Just Sends Me This Error:
Players.RacerDreng.Backpack.MetalDetector.LocalScript:7: invalid argument #2 to 'random' (interval is empty)
And This Is My Script:
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Button1Down:Connect(function()
if mouse.Target.Name == "Treasure" then
local Z = math.random(22.5,45.5)
print(Z)
local X = math.random(74.5,24.5)
print(X)
mouse.Target.Position = Vector3.new(X,mouse.Target.Position.Y,Z)
print(mouse.Target.Position)
end
end)
it is in a local script BTW
Please Help.
