function positionBlock()
xcoord = math.random(138.5,252.5)
ycoord = math.random(-19,-18.5)
zcoord = math.random(-252.5,-137.5)
luis.Position=Vector3.new(xcoord,ycoord,zcoord)
end
luis = Instance.new("Part",workspace)
luis.Size=Vector3.new(5,1,5)
luis.TopSurface = 0
luis.BottomSurface = 0
luis.Touched:Connect(function(thingTouchingBlock)
if thingTouchingBlock.Parent:FindFirstChild("Humanoid")then
print("Block touched by ", thingTouchingBlock.Name)
positionBlock()
end
end)
positionBlock()
so this script is making a random button appear, but I want the button to change to a random color every .3 seconds, but if I try to add a loop it would halt everything else. I want it to keep changing colors and not just change color when you touch it. plz help thanks!
