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

How would I make this so only one player would see this?

game.Workspace.Portal1.Touched:connect(function()
	script.Parent.Parent.Menumusic.Menu:Play()
script.Parent.Parent.Background:TweenPosition(UDim2.new(-0.1, 0,0, 0), "Out", "Quad",2)
wait(2)
script.Parent.Parent.RED:TweenPosition(UDim2.new(0.02, 0,0, 0), "Out", "Quad",2)
wait(1)
script.Parent.Parent.Buttons.Frame.Telport4:TweenPosition(UDim2.new(0.1, 0,0.94, 0),"Out", "Quad",2)
wait(1)
script.Parent.Parent.Buttons.Frame.Telport3:TweenPosition(UDim2.new(0.1, 0,0.74, 0),"Out", "Quad",2)
wait(1)
script.Parent.Parent.Buttons.Frame.Telport2:TweenPosition(UDim2.new(0.1, 0,0.54, 0),"Out", "Quad",2)
wait(1)
script.Parent.Parent.Buttons.Frame.Telport1:TweenPosition(UDim2.new(00.1, 0,0.34, 0),"Out", "Quad",2)
wait(0.1)
script.Parent.Parent.Buttons.Frame.Back:TweenPosition(UDim2.new(00.1, 0,0.24, 0),"Out", "Quad",2)
end)

How would I make it so only the player that touched the brick would see it?

1 answer

✓ Accepted answer

Well, you could approach this a few ways. You could have some RemoteEvents set up, but that'll take more explaining to do. The simple way to do it, is to compare the person who touched it's name, and the LocalPlayer's Name: (LocalScript)

game.Workspace.Portal1.Touched:connect(function(hit)
	if not game.Players:GetPlayerFromCharacter(hit.Parent) or game.Players:GetPlayerFromCharacter(hit.Parent).Name ~= game.Players.LocalPlayer.Name then return end
	script.Parent.Parent.Menumusic.Menu:Play()
	script.Parent.Parent.Background:TweenPosition(UDim2.new(-0.1, 0,0, 0), "Out", "Quad",2)
	wait(2)
	script.Parent.Parent.RED:TweenPosition(UDim2.new(0.02, 0,0, 0), "Out", "Quad",2)
	wait(1)
	script.Parent.Parent.Buttons.Frame.Telport4:TweenPosition(UDim2.new(0.1, 0,0.94, 0),"Out", "Quad",2)
	wait(1)
	script.Parent.Parent.Buttons.Frame.Telport3:TweenPosition(UDim2.new(0.1, 0,0.74, 0),"Out", "Quad",2)
	wait(1)
	script.Parent.Parent.Buttons.Frame.Telport2:TweenPosition(UDim2.new(0.1, 0,0.54, 0),"Out", "Quad",2)
wait(1)
	script.Parent.Parent.Buttons.Frame.Telport1:TweenPosition(UDim2.new(00.1, 0,0.34, 0),"Out", "Quad",2)
	wait(0.1)
	script.Parent.Parent.Buttons.Frame.Back:TweenPosition(UDim2.new(00.1, 0,0.24, 0),"Out", "Quad",2)
end)

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