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

(SOLVED) How do I make a clients part visible to all players?

Asked by 5 years ago
Edited 5 years ago

Im working on a script that spawns a trail on each player in the game. Since in my game there will be multiple trails, I made a module script that loads the given trail and adds it to the player. The only problem is that the trails isn't being shown to the server, only the client can see their own trail. Im using a local script to call my methods. How can I show my trails to other players?

In my game, trails are gonna be a combination of trails, particles, and possibly beams, all of which are gonna be in folders, so if you're wondering why the script is doing more than it should, thats why.

    function ikepacks:LoadIkePack(Pack,root)

        local selectedpack = {Name = "selectedpack"}
        local packtab = {}

        ClonedIP = IkeFolder[Pack]:Clone()
        ClonedIP.Parent = root.Parent
        local IkePack = ClonedIP:GetChildren()

        packtab["Flow"] = {Name = "Flow"}
        packtab["Spark"] = {Name = "Spark"}
        packtab["IkeFlow"] = {Name = "IkeFlow"}
        packtab["IkeSpark"] = {Name = "IkeSpark"}
        packtab["IkeBoostFlow"] = {Name = "IkeBoostFlow"}
        packtab["IkeBoostSpark"] = {Name = "IkeBoostSpark"}
        packtab["IkeSprintFlow"] = {Name = "IkeSprintFlow"}
        packtab["IkeSprintSpark"] = {Name = "IkeSprintSpark"}
        packtab["Impact"] = {Name = "Impact"}
        packtab["Freefall"] = {Name = "Freefall"}


        Extract(IkePack,selectedpack) -- Just sends the trails and particles to a table
        Move(selectedpack,ClonedIP) -- changes particle's parent to make it visible
        print("-------- Finished Extracting Ike Packs --------")
        Order(packtab,selectedpack) -- Moves trails and particles into separate tables for other scripts to access

        ClonedIP.CFrame = root.CFrame * CFrame.new(0,0.7,0)

        local weld = Instance.new("Weld")
        weld.Part0 = root
        weld.C0 = root.CFrame:Inverse()
        weld.Part1 = ClonedIP
        weld.C1 = ClonedIP.CFrame:Inverse()
        weld.Parent = ClonedIP
        ClonedIP.Anchored = false

        return packtab
    end

1 answer

Log in to vote
0
Answered by 5 years ago

Hi kid you gotta do it from the server, cheers. :)

1
very useful answer thanks. BronzedMocha 60 — 5y
1
Like he said clone it from the server to the client, if you’re using your module script locally, then it will in essence be “local” ABK2017 406 — 5y
0
yeah i figured it out after a while and its all fixed, thanks for giving a legitimate, not condescending answer though. BronzedMocha 60 — 5y
Ad

Answer this question