I tried to add more seats to my vehicle and the fact that CanCollide is enabled, I have to use ProximityPrompts. Problem is that when I take a seat, the prompts of the other seats show up and I tried to disable it locally. But my code didn't work since I don't know how events work. There was another solution by getting all children and make Instance.Enabled false, but I don't know how to make it do so.
LocalScript code:
local promptService = game:GetService("ProximityPromptService") local UserInputService = game:GetService("UserInputService") local character = script.Parent local humanoid = character:WaitForChild("Humanoid") function onSeated(isSeated, seat) if isSeated then promptService.PromptHidden = true else promptService.PromptHidden = false end end humanoid.Seated:Connect(onSeated)
I think this should work. Your code didn't work because PromptHidden is an Event.
Place this LocalScript in StarterCharacterScripts
local promptService = game:GetService("ProximityPromptService") local UserInputService = game:GetService("UserInputService") local character = script.Parent local humanoid = character:WaitForChild("Humanoid") function onSeated(isSeated, seat) if isSeated then promptService.Enabled = true else promptService.Enabled = false end end humanoid.Seated:Connect(onSeated)