Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

{Mouse wheel/Value script} Not working?

Asked by 8 years ago

The point of this script is to make the value go up 1 if they scroll forward and go down 1 if they scroll backward, but nothing happens, no errors, and clues?

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()

Mouse.WheelForward:connect(function()
    script.Parent.val.Value = script.Parent.val.Value +1
end)

Mouse.WheelBackward:connect(function()
    script.Parent.val.Value = script.Parent.val.Value -1
end)


0
Maybe its your wheel cause nothing looks wrong? User#5978 25 — 8y
0
it works fine if i replace 5 and 9 with print "Scroll" so its not my wheel pluginfactory 463 — 8y
0
Whats the val? Is it string or number User#5978 25 — 8y
0
number pluginfactory 463 — 8y
View all comments (4 more)
0
Are you sure your testing this in Studio? This will error in play mode due to not waiting until the player fully loads.. Nickoakz 231 — 8y
0
No it wont, there are no variables. It just calls mouse which is loaded the same i think. User#5978 25 — 8y
0
Is this in a localscript? Sorry if I sound stupid. deputychicken 226 — 8y
0
It is. pluginfactory 463 — 8y

1 answer

Log in to vote
-2
Answered by 8 years ago

if you go into the object browser of roblox studio and look for mouse then go down to mousewheel it says that its non operational so trying to dothis wont work

Ad

Answer this question