For some reason, the image I want to display when you say a certain text “hey gord”, will not preview even when activated. There are no errors, and I can’t see the image.
Code:
local death = game.ReplicatedStorage.explode4
local jmpsnd = game.ReplicatedStorage.jumpscare
local gord = game.Workspace.gord
local jumpscare = game.StarterGui.jumspacre
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
player.Chatted:Connect(function(message)
if message == "hey gord" then
jmpsnd:Play()
jumpscare.Enabled = true
wait(1.5)
jumpscare.Enabled = false
character.Humanoid.Health = "0"
death:Play()
end
end)
end)
end)
local death = game.ReplicatedStorage.explode4
local jmpsnd = game.ReplicatedStorage.jumpscare
local gord = game.Workspace.gord
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
player.Chatted:Connect(function(message)
if message == "hey gord" then
-- use PlayerGui not StarterGui
local jumpscare = Player.PlayerGui.jumspacre
jmpsnd:Play() -- you can't hear sounds from ReplicatedStorage
jumpscare.Enabled = true
wait(1.5)
jumpscare.Enabled = false
character.Humanoid.Health = 0 -- use number not string
death:Play() -- you can't hear sounds from ReplicatedStorage
end
end)
end)
end)