Hello everyone! I am currently scripting a car system for my game Fort Jackson. For some reason, when I interact with the proximityprompt it does not make the GUI appear.
Script:
local player = game.Players.LocalPlayer
script.Parent.ProximityPrompt.Triggered:Connect(function()
if player:IsInGroup(13312052) then
game.StarterGui.Spawner.Enabled = true
print("Player "..player.Name.." has spawned a car.")
else
print("Player has no access to spawn a car.")
script.Parent.ProximityPrompt.ObjectText = "You do not have access to spawn a car."
end
end)
script.Parent.ProximityPrompt.Triggered:Connect(function(player)
if player:IsInGroup(13312052) then
game.StarterGui.Spawner.Enabled = true
print("Player "..player.Name.." has spawned a car.")
else
print("Player has no access to spawn a car.")
script.Parent.ProximityPrompt.ObjectText = "You do not have access to spawn a car."
end
end)
I removed the local player and added the player into the function place, it still doesn’t work. This is how my script looks like now:
script.Parent.ProximityPrompt.Triggered:Connect(function(player)
if player:IsInGroup(13312052) then
game.StarterGui.Spawner.Enabled = true
print("Player "..player.Name.." has spawned a car.")
else
print("Player has no access to spawn a car.")
script.Parent.ProximityPrompt.ObjectText = "You do not have access to spawn a car."
end
end)