Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Moving Object, Filtering Enabled help?

Asked by 7 years ago

So I'm trying to make a boat seat move and I'm not 100% clear on Filtering Enabled yet but if you can help and explain this to me a bit, I would really appreciate it.

I don't know if I did this right?

so Both the MoveEvent and StopEvent are in the VehicleSeat, as well as the localscript and script, are in the vehicleseat as well.

01--Client
02 
03local Players = game:GetService("Players")
04local UserInputService = game:GetService("UserInputService")
05local MoveEvent = script:WaitForChild("MoveEvent")
06local StopEvent = script:WaitForChild("StopEvent")
07 
08local KeysDown = {}
09 
10UserInputService.InputBegan:connect(function(Input)
11    local KeyCodeName = Input.KeyCode.Name
12 
13    if KeyCodeName == "W" then
14        MoveEvent:FireServer("Forwards")
15    elseif KeyCodeName == "S" then
View all 60 lines...
01--Server
02 
03local Boat = script.Parent
04local Players = game:GetService("Players")
05 
06local MoveEvent = script:WaitForChild("MoveEvent")
07local StopEvent = script:WaitForChild("StopEvent")
08 
09Boat.MaxSpeed = 18
10maxspeed = Boat.MaxSpeed
11Boat.BodyPosition.position = Boat.Position
12Boat.BodyGyro.cframe = Boat.CFrame
13speed = 0
14 
15Boat.ChildAdded:connect(function(Weld)
View all 50 lines...

Answer this question