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

It doesnt print in output after i press x??

Asked by 6 years ago
Edited 6 years ago

Whenever i press x it doesnt print worked?? I also have a Remote event called LightStart in ReplicatedStorage.

local repstore = game:WaitForChild("ReplicatedStorage")
local Remote = repstore:WaitForChild("LightStart")



local player = game.Players.LocalPlayer


mouse = player:GetMouse()
Cool = true


mouse.KeyDown:Connect(function(key)
    key = key:lower()
    if key == "x" then
        if Cool == true then return end
        Cool = false
        Remote:FireServer(mouse.Hit)


        print("Worked")

        wait(1)
        Cool = true


    end


end)
0
Don't use KeyDown. Use UserInputService or ContextActionService. SummerEquinox 643 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

i got it

Ad

Answer this question