How can I get when the remote event is fired?
Asked by
4 years ago Edited 4 years ago
So, Im trying to make a projectile attack however it isn't working.
so both the scripts are both in a tool with a remote event named Fire
local script:
1 | local Player = game.Players.LocalPlayer |
2 | local Mouse = Player:GetMouse() |
3 | Mouse.Button 1 Down:Connect( function () |
4 | script.Parent.Fire:FireServer() |
normal script:
02 | local player = game.Players.LocalPlayer |
03 | local Attack = game.ReplicatedStorage.Attack |
04 | local Tool = script.Parent |
07 | script.Parent.Fire:Connect( function (player, argument) |
09 | Attack.Parent = Tool.Parent |
10 | Attack.Position = script.Parent.Parent.Torso.Position |
11 | Attack.Velocity = Vector 3. new( 10 , 0 , 0 ) |
12 | Attack.Orientation = script.Parent.Parent.Torso.Orientation |
If I can get some help figuring this out it would be greatly appreciated im new to scripting, Thanks!