(UNSOLVED) Beam Showing Player Where To Go

Hey everyone, I was just simply wondering how i would get this desired effect from every single player to the room, also each player can only see their effect.

1 Like

also to clarify I am making a story game so im wondering if there is any way to get this function into a server script even though the player can only see their effect which is client side.

1 Like

Create a Beam instance and two Attachments using Instance.new() in a local script. Parent the first attachment, Attachment0, to the player’s HumanoidRootPart, and then the second one, Attachment1, to an invisible part you want the beam to point to. Parent Attachment1 to that part. Make sure CanCollide is turned off on that part. Set the Attachment0 property of the Beam to Attachment0 in the script, and then set the Attachment1 property to Attachment1.

Get an image. Get that images ID. Add a Beam to workspace to learn the properties and how they work, then change them in the script.

local function createAttachment(parent)
    local attachment = Instance.new("Attachment")
    attachment.Parent = parent
    return attachment

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")

-- Create Attachments
local attachment0 = createAttachment(humanoidRootPart)

-- Create an invisible part for Attachment1
local invisiblePart = Instance.new("Part")
invisiblePart.Size = Vector3.new(5, 5, 5) -- Set the size as needed
invisiblePart.Transparency = 1 -- Make it invisible
invisiblePart.CanCollide = false
invisiblePart.Parent = workspace

-- Create Attachment1
local attachment1 = createAttachment(invisiblePart)

-- Create a Beam instance
local beam = Instance.new("Beam")
beam.Attachment0 = attachment0
beam.Attachment1 = attachment1
beam.FaceCamera = true -- Face the camera for visibility

-- Set up Beam properties
beam.Color = ColorSequence.new(Color3.new(1, 0, 0)) -- Red color
beam.Transparency = NumberSequence.new(0, 1) -- Gradual transparency
beam.Width0 = 1
beam.Width1 = 1

beam.Parent = workspace

local imageId = "rbxassetid://111" -- Replace with your image ID

beam.Texture = imageId
beam.TextureLength = 10

would it be something like this?

1 Like

this is only client side tho it has nothing to do with the server script even though i need to trigger it somehow through the server script.

1 Like

From what you described the beam logic should only run on the client. Then to trigger the logic you could use OnClientEvent

1 Like

Well you could do as @MuffinHandler said

But If you don’t want that, you could make the beam and set it’s properties in a server script, then set the Enabled property to false and fire a remote event to set the Enabled property back to true on a local script.