As many as you like. You can even select multiple parts, tick the checkbox and all selected parts will now have the tag.
One last question, would I do the same for my tp script? But its proximity prompt.
TP SCRIPT:
script.Parent.Triggered:Connect(function(player)
local h = player.Character.Humanoid
if (h ~= nil) then
h.Parent:MoveTo(game.Workspace.TeleportPart.Position)
end
end)
You don’t really need that, as long as the tp script is a server script (not local).
P.S. use workspace
instead of game.Workspace
One more tip: when you’re using services, always use game:GetService()
(so instead of game.ReplicatedStorage
, use game:GetService("ReplicatedStorage")
.
https://devforum.roblox.com/t/opinions-on-getservice/2334361/114?u=ispacerblx
What is the difference between game.Workspace and workspace?
Well, they point to the same thing, but workspace
is guranteed 100% of the time to get you the workspace. Besides, it’s shorter so your code reads better.
You can rename services. You can set ReplicatedStorage’s name to “Workspace” and your code will break. Jailbreak is famous for doing this - they rename their services very often to throw off exploiters.
When you rename the workspace, game.Workspace
no longer works, but workspace
will still always work. game:GetService()
doesn’t care about the name too and will always give you what you want.
it seems the tp thing still doesnt work
What kind of script is it? Does it get cloned from ReplicatedStorage or does it stay in the workspace constantly?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.