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

Why won't my scrolling frame scroll when Keydown is activated?

Asked by 10 years ago
01game.StarterGui:SetCoreGuiEnabled(4, false)
02Player = game.Players.LocalPlayer
03Mouse = Player:GetMouse()
04 
05Size = script.Parent.AbsoluteWindowSize
06RSize = Size/4
07 
08Mouse.KeyDown:connect(function(key)
09    if key == "e" then
10        for i = 1,5 do
11        script.Parent.CanvasPosition = script.Parent.CanvasPosition +Vector2.new(Rsize, 0)
12        end
13        if script.Parent.SelectedTool.Value ~= 4 then
14            script.Parent.SelectedTool.Value =  script.Parent.SelectedTool.Value +1
15        end
View all 27 lines...

Answer this question