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

How do I copy a item in lighting in to a player who has previously touched a part?

Asked by 6 years ago
Edited 6 years ago
script.Parent.Touched:connect(function(part)
    if part.Parent and Game:GetService('Players'):GetPlayerFromCharacter(part.Parent) then
        local player = Game:GetService('Players'):GetPlayerFromCharacter(part.Parent)
        print (player)
        if player:GetRankInGroup(3193777) >= 3 then
            script.Parent.Decal.Transparency = 0
            script.Parent.Transparency = 1
            script.Parent.CanCollide = false
            game.Lighting.VerifiedGUI:Clone().Parent = game.Players.player.PlayerGui
            wait(0.8)
            script.Parent.Decal.Transparency = 1
            script.Parent.Transparency = 1
            script.Parent.CanCollide = true
        end
    end
end)

That is the full script. VerifiedGUI is in lighting.

0
Lighting is a terrible place for storage. Also, you cannot access a UI on the server. hiimgoodpack 2009 — 6y
0
??? WoW_AWSOME 2 — 6y
0
Fine, I moved the gui into replicated storage. WoW_AWSOME 2 — 6y

Answer this question