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

My remote event has no errors but wont work?

Asked by 3 years ago
Edited 3 years ago

Sorry for re posting the last time I on mistake clicked the solved error button when it the comment didn't fix it. Local Script

local UserInputService = game:GetService("UserInputService")
local debounce = false
UserInputService.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.E then
        if debounce == false then
        game.Players.LocalPlayer.PlayerGui.e.Frame.ePower.Visible = false
        script.EventPepporni:FireServer()
        local debounce = true
        wait(3)
            local debounce = false
            game.Players.LocalPlayer.PlayerGui.e.Frame.ePower.Visible = true
        end

    end
end)

Normal Script

game.StarterPlayer.StarterCharacterScripts.Pepporni.EventPepporni.OnServerEvent:Connect(function()
    print("it worked!!")
    local plr = script.Parent.Parent.Name
    local plrpos = game.Workspace:FindFirstChild(plr.name)
    local part = Instance.new("Part")
    part.parent = game.Workspace
end)
0
please accept my answer NarwhalAndMe 141 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago

This is because instead of the event being in the starter character scripts it should be in the replicated storage. Also, it wouldn't be in starter character scripts folder, it would be in the players character.

0
so the remote event and the script should be moved to replicated storage? thanks for responding robot7866 36 — 3y
0
no just the remote event, then change the script to locate it in replicated storage. NarwhalAndMe 141 — 3y
0
Yay it works!!! robot7866 36 — 3y
0
Please accept my answer! NarwhalAndMe 141 — 3y
0
I answered that in your other question :( JustinWe12 723 — 3y
Ad

Answer this question