I need URGENT help. I need to keep a part under the player that acts as a radius. Ive tried many things, welding. That failed miserably, tried using heartbeat, but that takes a few ms to move under the player after they start moving. the only other way that worked was handling it on the client. But I need it on the server. I will attach my code and video below
Relevant code: function SetupRadius(player)
local playerData = dataHandler.getOrLoadPlayerData(player)
local eRadius = playerData.Radius
local radiusModel = game.ServerStorage.Assets.Radius_models:WaitForChild(eRadius):Clone()
radiusModel.Parent = game.Workspace.RadiusModels
local plyrTag = Instance.new("StringValue", radiusModel)
plyrTag.Name = "plyr"
plyrTag.Value = player.Name
local weld = radiusModel.Weld
weld.Part0 = radiusModel
weld.Part1 = game.Workspace:WaitForChild(player.Name).HumanoidRootPart
end
function updateRadius(player)
local radiusModel = nil
for _, radius in game.Workspace.RadiusModels:GetChildren() do
if radius:WaitForChild("plyr").Value == player.Name then
radiusModel = radius
end
end
radiusModel:Destroy()
SetupRadius(player)
end
Try disabling CanCollide on the welded part.
Or you can constantly teleport the radius part under the player with Stepped.
Ive tried that. It takes too long to move under the player, when the player moves, then after a few ms THEN the radius moves towards them
Couldn’t you just weld the part to the torso then use Vector3 to position it under the feet appropriately?
You can use different events of RunService that fit your needs, Stepped runs every frame prior to the physics simulation.
Thats what I tried in the video. It didnt work, the player would be able to crash into stuff, then they would fall over. And if I turned canCollide off it wouldnt be able to pick up objects that it hits
How would it not be able to pick up objects that it hits? .Touched event still fires even when CanCollide is off.
It makes more of an issue. How could I use scripting?
Are you still using a weld? Or you’re using RunService?
I decided that it was too hard to update from the server. So im updating it on the client side now. Im hoping that it wont get hacked
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.