Im trying to get a sign to change text to: "This tycoon is owned by example1234!" so people can know who owns a tycoon. The changing the text is on line 6, the error is "Attempt to index nil with "Name"
tyen1n is a model with a block called text
script.Parent.Touched:Connect(function(hit)
if script.Parent:GetTouchingParts(hit.Parent.HumanoidRootPart) then
script.Parent.CanCollide = false
script.Parent.BrickColor = BrickColor.new("Really red")
game.Workspace.ty1ba.Size = Vector3.new(420.69, 0.8 , 420.69)
script.Parent.Parent.tyen1n.Text.SurfaceGui.TextLabel.Text = "This tycoon is owned by " .. game.Players.LocalPlayer.Name
game.Workspace.tyc1.start.CanCollide = true
game.Workspace.tyc1.start.SurfaceGui.Enabled = true
game.Workspace.tyc1.start.Script.Disabled = false
end
end)

2 comments
Is this in a local script or server script
Is this a script or local script?