Hello, I am creating a tycoon game.
In this script, It allows the player to claim a tycoon. However, The code that makes sure the textlabel does not overlap with the prompt does not work.
I tried putting the code labeled “Problem Code” in a local script but it still did not work.
Here is my code:
--Problem Code
script.Parent.Door.ProximityPrompt.PromptShown:Connect(function() --Hide
print('You dont see')
script.Parent.Door.BillboardGui.Enabled = false
end)
script.Parent.Door.ProximityPrompt.PromptHidden:Connect(function() --Show
print('You now see')
script.Parent.Door.BillboardGui.Enabled = true
end)
--------------------------------------------
script.Parent.Door.ProximityPrompt.Triggered:Connect(function(player)
if script.Parent.Owner.Value ~= '' then
return
end
script.Parent.Door.ProximityPrompt.Enabled = false
script.Parent.Owner.Value = player.Name
script.Parent.Door.BillboardGui.TextLabel.Text = 'Owner: '.. player.Name
script.Parent.Door.Transparency = 0.6
script.Parent.Door.CanCollide = false
end)
Does anyone know why the problem code does not show or hide the text label for when its either shown or hidden, even when in a local script?