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

4 comments
I'm a bit confused, is the "script" that deploys the beam inside of the tool?
Yes
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.
ok thank