I would like this script to work, since it is basically the point of the game
When I try to give the balls a random colour they just don’t spawn, aswell as a vector force, so it would roll to random directions
I’ve tried copying a code that worked for me in the past, so I dont know why it isn’t working as it is supposed to, the only difference in the old one was that it was in a starter character script.
And the cooldown script kinda doesn’t work.
local origionalball = script.Parent.Parent.Origoball
local clickdet = script.Parent.ClickDetector
local r = math.random(0, 255)
local g = math.random(0, 255)
local b = math.random(0, 255)
local x = math.random(0, 1000)
local y = math.random(0, 1000)
local z = math.random(0, 1000)
local cooldown = script.Value.Value
--The scripts with -- are dissabled I like to do that so I don't forget I gotta deal with that problem
clickdet.MouseClick:Connect(function(player)
if cooldown == false then
origionalball:Clone()
local cloneball = origionalball:Clone()
--cloneball.VectorForce.Force(x, y, z)
--cloneball = Color3.fromRGB(r, g, b)
cloneball.Parent = workspace
cloneball.CanCollide = true
cloneball.Anchored = false
cloneball.Transparency = 0
cooldown = true
else
wait(1)
cooldown = false
end
end)
Video, to show that it actually doesn’t work:
If anyone could help a pretty new scripter it would be apreciated.
Also
if these help with anything