You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I am trying to make it so that if you equip a tool such as a gun in a vehicle, you peak out the window. I’m using remotes and animations
- What is the issue? Include screenshots / videos if possible!
local seat = script.Parent seat.Changed:Connect(function() if seat.Occupant ~= nil then local char = seat.Occupant char.Parent.ChildAdded:Connect(function(tool) if tool:IsA("Tool") then local player = game.Players:GetPlayerFromCharacter(char) game.ReplicatedStorage.RightPeak:FireClient(player) end end) end end)
local char = script.Parent local plr = game.Players.LocalPlayer RightAnim = char:WaitForChild("Humanoid"):LoadAnimation(script:WaitForChild('PeakCar')) game.ReplicatedStorage.RightPeak.OnClientEvent:Connect(function(player) RightAnim:Play() end)
The error I am getting is:
FireClient: player argument must be a Player object
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried looking the error up and modifying the script multiple times but to no luck it still didn’t work. If anybody could tell me what is wrong it would be really appreciated!