#I dont know why this simple simple script isnt working im dumb

8 messages · Page 1 of 1 (latest)

past robin
#
local textlabel = script.Parent.Parent:WaitForChild("TextLabel")
local prompt = script.Parent.Parent.Parent:WaitForChild("ProximityPrompt")
local number = game.ReplicatedStorage:WaitForChild("Number")

prompt.Triggered:Connect(function()
    textlabel.Text = tostring(number.Value)
end)

hushed nexus
#

Any errors?

past robin
#

no errors

past robin
#

no

#

its a local

#

i tried to change it to

#
local player = game.Players.LocalPlayer
local label =  script.Parent
local prompt = game.Workspace.Rig.ProximityPrompt
wait(0.000001)
local number = player:WaitForChild("NumberCode"):WaitForChild("Number").Value

prompt.Triggered:Connect(function()
    label.Text = number
end)