I ran into this problem when I was first learning how to script.
By saying the following, you're assigning 'num' a number, not the actually Scrollnum.
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local num = script.Parent.Scrollnum.Value
Mouse.WheelForward:connect(function()
num = num +1
end)
Mouse.WheelBackward:connect(function()
end)
Meaning,
num = script.Parent.Scrollnum.value
Is the exact same thing as
num = 5
This is a simple fix.
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local num = script.Parent.Scrollnum
Mouse.WheelForward:connect(function()
num.Value = num.Value +1
end)
Mouse.WheelBackward:connect(function()
end)
I don't know how to explain it any other way. Please thumb up if this helped.
1 comment
Hmm doesnt seem to be working, the value number value isnt going up, any idea