why is my tool script is non functional?
Right now I am trying to get a test version done of it, but no errors are coming out, and the thing wont move the canvas position, plus the selectedtool value is not working. It is a number value btw. Thanks for all and any help. Does anyone know why?
01 | game.StarterGui:SetCoreGuiEnabled( 4 , false ) |
02 | Player = game.Players.LocalPlayer |
03 | Mouse = Player:GetMouse() |
04 | Mouse.KeyDown:connect( function (key) |
05 | if key = = "e" and script.Parent.CanvasPosition ~ = UDim 2. new( 1.5 , 0 ) then |
07 | script.Parent.CanvasPosition = script.Parent.CanvasPosition +Vector 2. new( 0.01 ) |
09 | script.Parent.SelectedTool.Value = script.Parent.SelectedTool.Value + 1 |
12 | Mouse.KeyDown:connect( function (key) |
13 | if key = = "q" and script.Parent.CanvasPosition ~ = UDim 2. new( 0 , 0 ) then |
15 | script.Parent.CanvasPosition = script.Parent.CanvasPosition -Vector 2. new( 0.01 ) |
17 | script.Parent.SelectedTool.Value = script.Parent.SelectedTool.Value - 1 |