Hey, this is my first post and I'm just simply trying to learn why this line of code requires a string and if I can get it to take a variable/instance.
All I'm doing is trying to make a sign change to the player's name when touched.
I do understand that this code does have some stuff that could be shed off but I still can't find out why it wouldn't work.
The line of code I'm having trouble with is
"ourSign.Text = character"
My full code:
local sec15 = script.Parent
local platformg = false
local ourSign = game.Workspace.oursign.SurfaceGui.TextLabel
local function onTouch(partTouched)
local character = partTouched.parent
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
if character and platformg == false then
ourSign.Text = character
platformg = true
end
end
--Event sec15.Touched:Connect(onTouch)

1 comment
Not exactly sure what all the prints are about, or if i even put them there..