Mounted turret script is unresponsive?
Hi there, scripters!
I have a problem with my turret script, which is intended to point towards the seat occupant's mouse coordinates, but it isn't sending a remote function that requests the mouse coordinates from a local script. I've had tons of problems with remote functions/events that send signals to the client before. Any help is appreciated!
server sided script:
01 | seat = script.Parent.Seat |
02 | turretbase = script.Parent.TurretBase |
05 | seat:GetPropertyChangedSignal( "Occupant" ):Connect( function () |
06 | while seat.Occupant ~ = nil do |
07 | local direction = script.Parent.GetMouse:InvokeClient(game.Players:FindFirstChild(seat.Occupant.Parent.Name),seat.Occupant) |
08 | turretbase.CFrame = CFrame.new(turretbase.Position,direction) |
client sided script (local script)
1 | mouse = game.Players.LocalPlayer:GetMouse() |
3 | function script.Parent.GetMouse.OnClientInvoke(player,occupant) |