I’ve done everything, I should’ve mentioned in the post. I’ve reinstalled, restarted, and played around with some settings. Still no luck. But sure, here’s the script for you!
local ProximityPromptService = game:GetService("ProximityPromptService");
local MarketplaceService = game:GetService("MarketplaceService");
local CollectionService = game:GetService("CollectionService");
local ReplicatedStorage = game:GetService("ReplicatedStorage");
local ServerStorage = game:GetService("ServerStorage");
local Connections = ReplicatedStorage.Connections
local Assets = ServerStorage.Assets
local Vehicles = Assets.Vehicles
local Gears = require(ReplicatedStorage.Content.Library.Gears)
local Actor = script:GetActor()
local OwnerDoorObjects = {};
local GateObjects = {};
local GateChannels = {};
Actor:BindToMessage("GearGiverPrompt", function(prompt, player)
local name = prompt:GetAttribute("Gear");
if not player.Backpack:FindFirstChild(name) and not player.Character:FindFirstChild(name) then
local Tool = Gears:Get(name)
Tool.Parent = player.Backpack;
end
end)
Actor:BindToMessage("TurretOnOffPrompt", function(prompt, player)
local Tycoon = prompt:FindFirstAncestorOfClass("Configuration")
if Tycoon and Tycoon:GetAttribute("TycoonOwner") == player.Name then
prompt.ActionText = if "Turn Off" then "Turn On" else "Turn Off"
prompt.Parent.Parent.canAttack.Value = not prompt.Parent.Parent.canAttack.Value
end
end)
Actor:BindToMessage("PassPrompt", function(prompt, player)
MarketplaceService:PromptGamePassPurchase(player, prompt:GetAttribute("PassId"))
end)
Actor:BindToMessage("LaserOwnerDoorPrompt", function(prompt, player)
local Tycoon = prompt:FindFirstAncestorOfClass("Configuration");
local Channel = prompt:GetAttribute("Channel");
if Tycoon:GetAttribute("TycoonOwner") ~= player.Name then return end
for _,v in CollectionService:GetTagged("OwnerOnlyDoor") do
if not prompt:IsDescendantOf(Tycoon) then continue end
if v:GetAttribute("Channel") ~= Channel then continue end
if not OwnerDoorObjects[v] then
OwnerDoorObjects[v] = v.Transparency;
end
if v.Transparency == 1 then
v.Transparency = 0;
v.CanTouch = true;
else
v.Transparency = 1;
v.CanTouch = false;
end
end
for _,v in CollectionService:GetTagged("OwnerOnlyDoorVisuals") do
if not prompt:IsDescendantOf(Tycoon) then continue end
if v:GetAttribute("Channel") ~= Channel then continue end
if not OwnerDoorObjects[v] then
OwnerDoorObjects[v] = v.Transparency;
end
if v.Transparency == 1 then
v.Transparency = 0;
else
v.Transparency = 1;
end
end
end)
Actor:BindToMessage("GatePrompt", function(prompt, player)
local Tycoon = prompt:FindFirstAncestorOfClass("Configuration");
local Channel = prompt:GetAttribute("Channel");
if Tycoon:GetAttribute("TycoonOwner") ~= player.Name then return end
GateChannels[Channel] = not GateChannels[Channel]
for _,v in CollectionService:GetTagged("GatePrompt") do
if not prompt:IsDescendantOf(Tycoon) then continue end
if v:GetAttribute("Channel") ~= Channel then continue end
if v:IsA("BasePart") then
if v.Name == "Button" then
SetABColor(v, prompt)
continue
end
if v.Name == "Door" then
if not GateObjects[v] then
GateObjects[v] = v.Transparency;
end
if v.Transparency == 1 then
v.Transparency = 0;
v.CanCollide = true;
else
v.Transparency = 1;
v.CanCollide = false;
end
end
else
SetABPrompt(v);
end
end
end)
Actor:BindToMessage("RegenVehiclePrompt", function(prompt, player)
local Tycoon = prompt:FindFirstAncestorOfClass("Configuration")
if player.tycoonBase.Value ~= Tycoon then return end
local Name = prompt:GetAttribute("Object")
local Object = Vehicles:FindFirstChild(Name)
if not Object then return end
if prompt.Current.Value then
prompt.Current.Value:Destroy()
prompt.Current.Value = nil
end
local Clone = Object:Clone()
Clone:PivotTo(prompt.Parent.Spawn.WorldCFrame)
Clone.Parent = Tycoon.tycoonThings.Vehicles
prompt.Current.Value = Clone
end)
Connections.FireProximityPrompt.OnServerEvent:Connect(function(Player, Prompt)
Actor:SendMessage(Prompt.Name, Prompt, Player)
SetABPrompt(Prompt)
end)
function SetABPrompt(prompt: ProximityPrompt, value: number)
if prompt:HasTag("Prompt:NoActive") then
return
end
local APrompt = prompt:GetAttribute("APrompt") or ""
local BPrompt = prompt:GetAttribute("BPrompt") or ""
local Channel = prompt:GetAttribute("Channel") or 0
prompt:SetAttribute("Channel", 0)
prompt.ActionText = value and APrompt or BPrompt
end
function SetABColor(button: Part, prompt: ProximityPrompt)
if prompt:HasTag("Prompt:NoColor") then
return
end
local AColor = prompt:GetAttribute("AColor") or BrickColor.new("Medium stone grey");
local BColor = prompt:GetAttribute("BColor") or BrickColor.new("Medium stone grey");
local Channel = prompt:GetAttribute("Channel")
button.BrickColor = GateChannels[Channel] and AColor or BColor
end
for _,v in CollectionService:GetTagged("DynamicPrompt") do
SetABPrompt(v)
if v.Name == "GatePrompt" then
local Channel = v:GetAttribute("Channel")
if GateChannels[Channel] == nil then
GateChannels[Channel] = true;
end
v.ActionText = GateChannels[Channel] and v:GetAttribute("APrompt") or v:GetAttribute("BPrompt")
end
end