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

01local UserInputService = game:GetService("UserInputService")
02local debounce = false
03UserInputService.InputBegan:Connect(function(input)
04    if input.KeyCode == Enum.KeyCode.E then
05        if debounce == false then
06        game.Players.LocalPlayer.PlayerGui.e.Frame.ePower.Visible = false
07        script.EventPepporni:FireServer()
08        local debounce = true
09        wait(3)
10            local debounce = false
11            game.Players.LocalPlayer.PlayerGui.e.Frame.ePower.Visible = true
12        end
13 
14    end
15end)

Normal Script

1game.StarterPlayer.StarterCharacterScripts.Pepporni.EventPepporni.OnServerEvent:Connect(function()
2    print("it worked!!")
3    local plr = script.Parent.Parent.Name
4    local plrpos = game.Workspace:FindFirstChild(plr.name)
5    local part = Instance.new("Part")
6    part.parent = game.Workspace
7end)
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