local Lplayerid = script.Parent.Parent.User.Value local lhum = tostring(Lplayerid) local hum = game.Workspace.lhum.HumanoidRootPart
This is in a regular script that's why I took the player from a stringvalue. Any help would be appreciated!
EDIT : Btw everything everything in the script works expect the local-player workspace part.
If all you're trying to do is get the HumanoidRootPart from the player's Character then you can use a local script for this then use a RemoteEvent to fire the server from the localscript and use a server script to do the rest of the code if you want anything to be server sided. Example:
Local Script:
local player = game.Players.LocalPlayer local character = player.Character local Hum = character.HumanoidRootPart local RemoteEvent = game.ReplicatedStorage.RemoteEvent -- Any code you want for the local script, if all the code you want to be Server-Sided then skip this RemoteEvent:FireServer()
Server Script:
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player) local character = player.Character local Hum = character.HumanoidRootPart -- Code end)
local LocalPlayer = game.Players.LocalPlayer local LocalPlayerCharacter = LocalPlayer.Character local Hum = LocalPlayerCharacter.HumanoidRootPart