This code wont work, its inside a proximity prompt and I want when its triggered to make a ui enabled. it wont work.
script.Parent.Triggered:Connect(function()
game.Players.LocalPlayer.PlayerGui.ScDTest.Enabled = true
end)
This code wont work, its inside a proximity prompt and I want when its triggered to make a ui enabled. it wont work.
script.Parent.Triggered:Connect(function()
game.Players.LocalPlayer.PlayerGui.ScDTest.Enabled = true
end)
First, this seems as server script. So you can’t use game.Players.LocalPlayer in server scripts which is part of the FE update.
its a local script inside of a proximity prompt
It can’t run because its in a proximity prompt not StarterGui(There are other places like StarterPlayerScripts), this script should work in StarterGui:
local proxyimityPrompt = insert_path_here --Replace insert_path_here with the path you chose.
proxyimityPrompt.Triggered:Connect(function()
game.Players.LocalPlayer.PlayerGui.ScDTest.Enabled = true
end)
Thanks! So next time it has to be in the gui?
Yes it has to be in a least StarterGui.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.