its because you put it in a server script, try it with local script and also u cant get the starter gui this way, u need to get the player’s playergui
because youre changing the ui in startergui while youre supposed to change it in the players playergui, get the player with Players:GetPlayerFromCharacter
and access the ui with Player.PlayerGui
you need to get the PlayerGui not the StarterGui
replace
game.StarterGui.ScreenGui.Frame.Visible = true
with
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.PlayerGui.ScreenGui.Frame.Visible = true
Thank you a lot for your help!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.