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

Part not tping to others?

Hey so I am trying to make a part go to others and its in an event so it goes from the server but when I type a name in it will not go to that player it only goes to me! plr goes to the text box where you say the play and jail is just the model in the workspace!

open = false

game.ReplicatedStorage.jail.OnServerEvent:Connect(function(plr,jail)
	
	if open == false then
	
	game.Workspace.j:Clone().Parent = game.Workspace
	game.Workspace.j.CFrame = CFrame.new(plr.character.HumanoidRootPart.Position)	
	open = true
else
	game.Workspace.j:Destroy()
	open = false
	
	end
	
end)

2 comments

0

See who player is in the parameters and make Character capitalized.

0

How would we see what player is in the parameters?

1 answer

First parameter of RemoteEvent is player if you have something like this

Event:FireServer(player,jail) -- Player is player that is in textbox

-- Then parameters should be like this
Event.OnServerEvent:Connect(function(player,target,jaul) -- In this case target is player that is textbox

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