Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would i replicate CylinderHandleAdornments to the Server?

Asked by 5 years ago

Before we start if you don't know what one is look here

https://developer.roblox.com/api-reference/class/CylinderHandleAdornment

OK now we know what we are talking about ive CylinderHandleAdornments them to emulate raytracing for an FPS as you can see here

local ray2 = Ray.new(Muzzle.CFrame.p,Muzzle.CFrame.lookVector*2)
    local visualRay = Instance.new("CylinderHandleAdornment", game.Workspace.Terrain)
    visualRay.Height = ray2.Direction.magnitude -- or 2
    local center = ray2.Origin + ray2.Direction / 2
    visualRay.AlwaysOnTop = false
    visualRay.CFrame = CFrame.new(center, center + ray.Direction)
    visualRay.Color3 = Color3.new(1,.65,.6)
    visualRay.Radius = 0.1
    visualRay.Transparency = 0
    visualRay.Adornee = game.Workspace.Terrain
    spawn(function()
    while rs:wait() do
    visualRay.CFrame = visualRay.CFrame*CFrame.new(0,-.1,-10)
    game:GetService("Debris"):AddItem(visualRay,.1)

So basically i want to know how i can Replicate these to the server to give other players a visual of if they are being shot

Thanks

0
Say you have a Server Script create a part with Instance.new and is put into workspace. This part is replicated to all players and the server can see it. If you do this with a local script under the client then only the client will see it and not the server. xPolarium 1388 — 5y
0
That's a basic explanation when working with FE. There isn't much to add to your code besides fixing most of it. xPolarium 1388 — 5y
0
how will i update the parts position like i have done here on the server fortune80 -4 — 5y
0
HOW please help Polarium fortune80 -4 — 5y
0
If you want to replicate Bullet Tracers you need to Fire an event to the server and then have the server fire all clients to a client script to handle the tracer. Make sure you send the data for the raycast throught the event so that other Client Script has the required information for the tracer, Also using you're script will work, if you need any extra help contact me through roblox | Signed: An Chill_Wolfz 0 — 4y

Answer this question