-- Input Service
local UserInputService = game:GetService("UserInputService")
-- Indicator Module Script
local indicator = require(game.ReplicatedStorage.Indicator)
print("Module Began")
-- Player
local Player = game:GetService("Players")
Player.PlayerAdded:Connect(function(player)
local playername = player.Name
local humanoid = if player.Character then player.Character:FindFirstChild("Humanoid") else nil
end)
print("Players Spawned")
-- Drive Seat
local driver = script.Parent
print("Driver Seats Work")
-- Left + Right Indicator Groups
local left = script.Parent.Parent.Body.Indicators.Left
local right = script.Parent.Parent.Body.Indicators.Right
print("Group Models Work")
-- Left + Right Models
local BL = left["Back Left"].SpotLight
local BR = right["Back Right"].SpotLight
local FL = left["Front Left"].SpotLight
local FR = right["Front Right"].SpotLight
print("Blocks Spawned")
-- Bool Value
local bool = script.Parent.Parent.Body.Indicators.BoolValue
-- Main Script
if bool then
bool.Value = false
end
driver:GetPropertyChangedSignal("Occupant"):Connect(function()
bool.Value = driver.Occupant ~= nil
end)
print("Bool Value Initialised")
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == indicator.Controls.LeftIndicator then
print("WORKING")
end
if bool and bool.Value ~= nil then
BL.Enabled = true
BL.Enabled = true
end
end)
this is the now local script