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

What is wrong with this script? [closed]

Asked by 10 years ago
local toolname = "Luger, Colt 45"  
script.Parent.Touched:connect( function(hit)  
    if hit.Parent then 
        local player = Game.Players:GetPlayerFromCharacter(hit.Parent)  
        if player and not player:FindFirstChild("No") then 
            if player.Character:FindFirstChild(toolname) then 
                local gui = player.PlayerGui.StoreRobberyGUI 
                local no = Instance.new("IntValue", player) 
                no.Name = "No" 
                Spawn(function() 
                    wait(10) 
                    no:Destroy() 
                end) 
            end 
        end 
    end 
end)  

I put this in the brick that I needed to touch it, the StoreRobberyGUI is the actual name of the GUI, but when I touch the brick holding one of the guns, it doesn't appear...

0
did you receive any output? FearMeIAmLag 1161 — 10y
0
No MrBriantacular 10 — 10y

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
nate890 495 Moderation Voter
10 years ago

You're not doing anything with gui yet as defined on line 7. Does it exist? If so, what's your method of making it appear all of a sudden? Is the visible property already set to false or is the transparency value 1?

Ad