basically, i have a regular script inside a part that, when touched, should make a frame from the UI turn visible. however, only the sound i scripted it to play works, and the UI itself doesnt actually show up. im not a great scripter so it could be an easy fix that im not seeing
I’ve tested the code, and it works just fine. The reason why the GUI is not appearing is that you’re modifying the one that is inside StarterGui, not the one inside PlayerGui.
Check if this version works for you.
local Players = game:GetService("Players")
local whisp = game.Workspace.Music.whisper1
whisp.Volume = 4
local prt = game.Workspace.whisperpart
function whis(hit)
local Character = hit.Parent
local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
if Humanoid and Humanoid.Health > 0 then
local Player = Players:GetPlayerFromCharacter(Character)
local PlayerGui = Player.PlayerGui
local dbuif = PlayerGui.whisper.water
whisp:Play()
prt:Destroy()
dbuif.Visible = true
wait(2)
dbuif.Visible = false
end
end
script.Parent.Touched:Connect(whis)
to add, nothing shows in the output, so im a little lost at what the issue is, if this script is working for you. the game itself is meant to be a single player, 1 person server game, and the script isnt in the game as a localscript, but a regular script.