I’m trying to make a tutorial for a player when it’s joining that he sees some beam lines that tell him where to go to claim a tycoon. The script i currently have it’s working but only if there is no tycoon claimed. If there was a player that claimed the tycoon and another one joins, he does not see the lines. Anyone who can help with that please? I’m also trying to make only one beam shown, not all 4 but idk how to do that either.
This is the script:
local Players = game:GetService("Players")
local Character = Players.LocalPlayer.CharacterAdded:wait()
local tycoonDoors = {
game.Workspace["Zednov's Tycoon Kit"].Tycoons.Amber.Entrance["Touch to claim!"].Head,
game.Workspace["Zednov's Tycoon Kit"].Tycoons.Amethyst.Entrance["Touch to claim!"].Head,
game.Workspace["Zednov's Tycoon Kit"].Tycoons.Ruby.Entrance["Touch to claim!"].Head,
game.Workspace["Zednov's Tycoon Kit"].Tycoons.Sapphire.Entrance["Touch to claim!"].Head,
}
local function createArrows()
for i,v in pairs(tycoonDoors) do
local beam = Instance.new("Beam")
beam.Parent = v
beam.Color = ColorSequence.new(Color3.fromRGB(255, 85, 0))
beam.Texture = "rbxassetid://7791559535"
beam.TextureMode = "Static"
beam.FaceCamera = true
beam.Transparency = NumberSequence.new{
NumberSequenceKeypoint.new(0.0,0.8),
NumberSequenceKeypoint.new(1.0,0.8),
}
beam.LightEmission = 1 -- use additive blending
beam.LightInfluence = 0 -- beam not influenced by light
beam.TextureLength = 1 -- repeating texture is 1 stud long
beam.TextureSpeed = -1 -- slow texture spee
local attachmentPlayer = Instance.new("Attachment")
attachmentPlayer.Name = "TycoonArrow"
attachmentPlayer.Parent = Character:WaitForChild("HumanoidRootPart")
beam.Attachment0 = v.Attachment
beam.Attachment1 = attachmentPlayer
end
end
createArrows()
local function disableArrows()
for i,v in pairs(tycoonDoors) do -- Loops through the doors table
v.Beam.Enabled = false -- Makes the beam not enabled
end
end
local function enableArrows()
for i,v in pairs(tycoonDoors) do -- Loops through the doors table
v.Beam.Enabled = true -- Makes the beam not enabled
end
end
local function CheckIfBeam()
if Players.LocalPlayer.Team.Name == "For Hire" then
enableArrows()
else
disableArrows()
end
end
wait(1)
while wait(1) do
CheckIfBeam()
end
And it looks like this if you are the first player: