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

ProximityPrompt Team object mover not working, any way to fix it?

Asked by 3 years ago

I created a script that is supposed to do if you activate a Proximityprompt that it will move the model called "Lasers" in Workspace to Lighting if you are on the team called "Prisoners". The color of the team is "deep orange"

Ive tried using a Remotevent to trigger it in Replicated storage,events. The Script doesnt give any error in the output but when I try it it doesnt work. I hope that anybody can help me with this.

local detector = script.Parent.ProximityPrompt
local requiredTeam = game.Teams.Prisoners

game.ReplicatedStorage.Events.Lasers.OnServerEvent:Connect(function(player)     
    if player.Team == requiredTeam then                 

        detector.Triggered:Connect(function(plr)                            

            game.Workspace.Lasers.Parent = game.Lighting
            wait (8)
            game.Lighting.Lasers.Parent = game.Workspace

            print("worky work") 

        end)
    end
end)
0
Can you confirm that the event is received on the server? I have had instances where, for whatever reason, an event could not be received (likely a bug). appxritixn 2235 — 3y
0
Not really since im new to scripting. NEMOTASTlC 7 — 3y

Answer this question