Just watch the video and pause where you are and copy what he has.
Are there any errors in the output?
Did it and Sadly Still doesnt work.
I tried copying his vid perfectly but even though it works for him doesnt work for me.
May I ask, What exactly isnât working is it the door not showing a name or?
Nope I am really Confuesed Why it isnt showing any
when i touch it it does nothing. Not an error doesnt do what its supposed to nothing. I think the problem is the if statement. I will try doing another print check
Can you send a video of you touching the door please?
Ok so the touch is now recognized and this if is in the clear. it must be the rest now
Try to print that:
print(mainparts.OwnerDoor.CanTouch)
So the door and script works now???
Nope still doesnt work but the if statement itself is no longer broken and the touch is recognized
I typed that in and it prints true
Is this what your trying to do?
Yeah that only with a seperate sign. also setting an owner value
Wait remove
and values.OwnerValue.Value == nil â this part and just keep it as
If Humanoid then
well if i did that it might work but then people would be able to just steal others tycoons. The reason thats there is so that you can only take it if its empty
Insert a new LocalScript into StarterPlayerScripts and put this code inside:
task.wait(10)
local p = game:GetService("Players").LocalPlayer
local c = p.Character or p.CharacterAdded:Wait()
local torso = c and c.UpperTorso or c.Torso
if torso then
print(workspace:ArePartsTouchingOthers({torso})
else
print('something went wrong')
end
Watch output
Your Script:
What you did wrong:
You said script.Parent.Touched â Instead of MainParts.OwnerDoor.MainDoor.Touched
What you should change it to:
local tycoon = script.Parent.Parent
local items = {}
â Foldersâ
local purchaced = tycoon:FindFirstChild(âPurchacedâ)
local buttons = tycoon:FindFirstChild(âButtonsâ)
local mainparts = tycoon:FindFirstChild(âMainPartsâ)
local scripts = tycoon:FindFirstChild(âScriptsâ)
local values = tycoon:FindFirstChild(âValuesâ)
mainparts.OwnerDoor.MainDoor.Touched:Connect(function(Hit)
if Hit.Parent:WaitForChild(âHumanoidâ) and values.OwnerValue.Value == nil then
local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
values.OwnerValue.Value = Player
mainparts.Sign.SurfaceGui.TextLabel.Text = Player.Name.."'s Factory"
end
end)