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

Why my Beam doesn't work with RemoteEvent ?

Asked by 4 years ago
Edited 4 years ago

What i am trying to do is a ray gun but because of the roblox filter other players can't see the ray of a player

what is in my localscript

script.Parent.FireBullet:FireServer(beam)

what is in my script

script.Parent.FireBullet.OnServerEvent:Connect(function(beam)
    game:GetService("Debris"):AddItem(beam, 0.05)
end)

Warning the script is in the tool

if i test my gun automatically when i press the button of my mouse to firing, the game make me disappear

0
I'm a bit confused, is the "script" that deploys the beam inside of the tool?   beeswithstingerss 41 — 4y
0
Yes LinkeeReiss 10 — 4y
0
Your script is running on the client, not the server because it's inside of the character. Move your script into ServerScriptService and move your remote event into replicatedStorage. Then from there, change your directories inside of your scripts to accommodate this. beeswithstingerss 41 — 4y
0
ok thank LinkeeReiss 10 — 4y

Answer this question