local player = game.Players.LocalPlayer local runService = game:GetService("RunService") local guiPart = workspace.MultiplayerComingSoon local nearPart = false runService.RenderStepped:Connect(function() if player:DistanceFromCharacter(guiPart.Position) < 2 then nearPart = true workspace.MultiplayerComingSoon.BillboardGui.TextLabel.Visible = true else nearPart = false workspace.MultiplayerComingSoon.BillboardGui.TextLabel.Visible = false end end)
I started scripting a couple weeks ago, I've been kind of off and on and haven't really focused on learning much since I started. Anyways, I'm trying to make it to where a text label pops up saying "Multiplayer is coming soon" when the player is near a part used for multiplayer. I've read up on it a little bit and I've seen all this magnitude stuff, not sure how to go about it. Any suggestions on making this work?
dont even need DistanceFromCharacter just do this.
local player = game.Players.LocalPlayer local runService = game:GetService("RunService") local guiPart = workspace.MultiplayerComingSoon local nearPart = false runService.RenderStepped:Connect(function() if (player.Character:WaitForChild("HumanoidRootPart").Position - guiPart.Position).Magnitude < 2 then nearPart = true workspace.MultiplayerComingSoon.BillboardGui.TextLabel.Visible = true else nearPart = false workspace.MultiplayerComingSoon.BillboardGui.TextLabel.Visible = false end end)