Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

contextActionService with Reload keybuttons?

Asked by 2 years ago
Edited 2 years ago

I think my script is wrong,

local contextActionService = game:GetService("ContextActionService")
contextActionService.LocalToolEquipped:Connect(function(Tool)
    local player = game:GetService("Players").LocalPlayer
        local char = player.Character or player.CharacterAdded:Wait()
        local tool = char:FindFirstChildOfClass("Tool")
        if tool then
            local bindables = tool:FindFirstChild("Bindables")
            if bindables then

                local bind = bindables:FindFirstChild("Reload")
                if bind then
                    bind:Fire()
                end
            end
            end

end)
ContextAction.LocalToolUnequipped:Connect(function(Tool)
    if Tool:FindFirstChild("Reload") then
        ContextAction:UnbindAction("Reload")
contextActionService:SetPosition("DeleteBaseplateButton",UDim2.new(0.10,-15,0.1,-1))
contextActionService:SetImage("DeleteBaseplateButton","http://www.roblox.com/asset/?id=1398003510")
0
How would we know? you have not explained the question at all. User#5423 0 — 2y

Answer this question