G2_funny
(G2F)
#1
Why is this not working?
Local Script:
script.Parent.Activated:Connect(function()
LocalPlayer = game.Players.LocalPlayer
Name = script.Parent.Name
game.ReplicatedStorage.Flash:Fire(LocalPlayer, Name)
end)
Server Script:
game.ReplicatedStorage.Flash.OnServerEvent:Connect(function(LocalPlayer, Name)
e = game.ServerStorage.Flash[Name]:Clone()
e.Parent = LocalPlayer.Character
e.Position = LocalPlayer.Character.HumanoidRootPart.Position
e.Orientation = LocalPlayer.Character.HumanoidRootPart.Orientation
e.WeldConstraint.Part1 = LocalPlayer.Character.HumanoidRootPart
end)
Images:
tictac67
(tictac67)
#2
You don’t need to pass the player when firing the server. Also, to fire the server it’s FireServer
rather than just Fire
EDIT: So this would be the correct way to do it game.ReplicatedStorage.Flash:FireServer(Name)
G2_funny
(G2F)
#3
Oh okay. Thank you for your answer.
tictac67
(tictac67)
#4
If it solves your issue please could you remember to mark it as the solution for future users with a similar issue?
G2_funny
(G2F)
#5
Okay, I will! I am testing it now.
tictac67
(tictac67)
#6
Thanks . Enjoy the rest of your day