Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make this visible only to the person who touched the part?

I made a localscript, which makes a frame visible. But, it becomes visible for everyone. Any ideas how to make it only for the player touching the part? I tried to make it's parent to LocalPlayer's PlayerGui, but it doesn't work

Code:

game.Workspace.Story.Touched:connect(function(hit)
	local human = hit.Parent:FindFirstChild("Humanoid")
	if human ~=nil then
		human.WalkSpeed = 0
	end
	local swoosh = script.Parent.Parent.Parent.Sound2
	swoosh:Play()
	wait(0.3)
	script.Parent.Visible = true
end)

2 comments

0

Is this in a SurfaceGui?

0

No, ScreenGui.

1 answer

It might be because the screengui is in the workspace. You might want to have the screen gui appear in game.Players['Player's Name'].PlayerGui

This discussion is preserved as it was. New answers, comments, and votes are closed.