Hi,
I am making a 'scary' game and want an image to pop-up when you touch a brick.
I want it so that I walk through a brick and an image pops up and a noise come on also at the same time. I also want it so that the music and sounds are individual to each player so when I touch the brick, I can hear the scream in my game but others cannot in their game.
So in other words what would the script be when I touch a brick and a picture pops up and sound but only appearing on the screen of the person touching it?
Please help?
Thanks Kieran
easy
Put your ScaryPopup named 'ScaryPopup00' inside Lighting and the Scary sound inside lighting too but named 'ScarySong'
Put this script inside your part:
script.Parent.Touched:connect(function(p) if (p.Parent:findFirstChild('Humanoid')~=nil) then --Finding out player if p.Parent.Name~='Workspace' then --Security Check for Scary Game Parts local Pl = game:service('Players'):GetPlayerFromCharacter(p.Parent) if (Pl~=nil) then local Prx = Pl.PlayerGui if Prx~=nil then --This is where we go local Pop = game:service('Lighting'):WaitForChild('ScaryPopup00') -- The Popup local Son = game:service('Lighting'):WaitForChild('ScarySong') -- The Song Pop:Clone().Parent=Prx -- Making it appear in PlayerGui Son:Clone().Parent=Prx --BUT WHY PLAYERGUI!!!??? --PlayerGui cuz it's the only way to show stuff only for the player. Hope this helps you! -- Console takes about 0.0000000000000000000000000000000000000000000000000000000205781023 seconds to read a line, so it's almost at exact same time. end end end end end)