I’m having trouble with my spin system, it’s not printing anything at all this is my script though:
script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr)
local char = plr.Character
local root = char.HumanoidRootPart
local hum = char.Humanoid
local plrgui = plr.PlayerGui
local screen = plrgui.LuckSpinGUI.SpinButton
local p = game.Lighting.PowerScripts
local val = screen.LuckScript.Object
for i = 1,70,1 do
local r = math.random(1,5)
val.Value = r
script.Parent.Parent.Text = r
wait(0.01)
end
if val.Value == 1 then
print("Value = 1")
end
if val.Value == 2 then
print("Value = 2")
end
if val.Value == 3 then
print("Value = 3")
end
if val.Value == 4 then
print("Value = 4")
end
if val.Value == 5 then
print("Value = 5")
end
end)
But when I do print (val.Value) it works but when I do this it doesn’t, any help will be really helpful and I hope you have a great day!
while true do
if val.Value == 1 then
print("Value = 1")
end
if val.Value == 2 then
print("Value = 2")
end
if val.Value == 3 then
print("Value = 3")
end
if val.Value == 4 then
print("Value = 4")
end
if val.Value == 5 then
print("Value = 5")
end
wait(0.01)--or change to what you want.
end