Use a serverscript, but you can’t use localplayer in a serverscript. Touched event gives you the part that touched the object so you can use that to find the player.
local Part=workspace.Part -- DEFINE YOUR PART
--[[]]--
local Player=game.Players.LocalPlayer
local Debounce=false
Part.Touched:Connect(function(Hit)
if Player.Character and Hit.Parent==Player.Character then
if Debounce==false then Debounce=true
Player.PlayerGui.ScreenGui.Enabled = true
game.Workspace.Rocket:Play()
wait(2)
Player.PlayerGui.ScreenGui.Enabled = false
game.Workspace.Rocket:Stop()
Debounce=false
end
end
end)
Place this in a LocalScript in StarterPlayerScripts