Did I do something wrong here I’m getting an error.
player.Character.Torso.Anchored = true
Did I do something wrong here I’m getting an error.
player.Character.Torso.Anchored = true
Is that your entire script? Roblox studio doesn’t magically know what player
is referring to, it’s just a variable name.
No, the script is much longer however this is the line I need fixed, Should I do
player = game.Players.LocalPlayer
before it to refrence player?
Edit when I did that the error still said
20:03:11.823 - Torso is not a valid member of Model “Workspace.Aid_nPlaysYT”
If you’ve never even created a variable named player then the word player has no value, you first need to assign a value to it like that.
You should use WaitForChild in that case
player.Character:WaitForChild("Torso").Anchored = true
Here is the part of the script that the code is on
function _m.WarnCustomer(warning,reason,player)
game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
player.Character.Torso.Anchored = true
if warning == 1 then
edit: there is more but its long so I won’t put the whole script.
Are you using r6 or r15? R15 had an upper and lower torso.
You could add local char = player.Character or player.CharacterAdded:wait()
to ensure that player character has been properly loaded.
game:GetService("Players").LocalPlayer.Character.Humanoid.Torso.Anchored = true
Torso not is member of model Character (Workspace.Player)
I think I’ll use a different warning system this one has to many errors. After that there are like 50 more and I think the code breaks tos.
Pass me the script and I’ll fix it for you
@AidanPlaysYT_Real Check your game settings under where it shows avatar/appearance. If it’s R15 then Torso isn’t a thing. It’s either UpperTorso
or LowerTorso
. Torso
is only for R6.
There’s a possibility that you’re using R15. In R15 rigs, there’s an “UpperTorso” and “LowerTorso.”
I meant It’s instead, UpperTorso
and LowerTorso
Okay Here Is The Script (I’m sending in file format because its long also I warned you guys it was bad so don’t blame me. It does epic stuff though.)
AutoWarn.rbxm (3.8 KB)
Download that then go in a studio and drag it from files to studio and it will show the script(s)
What is your thing set to? R15 or R6?
R15 I am pretty sure. (Idk but I think)
Change it to R6 and then it should work. Also, please warn members if you are going to ask them to download something that contains inappropriate language/profanity.
Yeah, I downloaded the script and changed Torso with UpperTorso and the script ran fine. Use UpperTorso is you use R15 and Torso for R6.
Only other issue is you won’t be able to call SetCore on the server. You would need to add a RemoteEvent to communicate with a LocalScript for that to work. This will only present a warning in the output.
or change the script to … .UpperTorso.Anchored = True
and … .LowerTorso.Anchored = True
try using HumanoidRootPart as it applies to all rigtypes so you should not worry about using Torso parts anymore
-- server(normal) script in startercharacterscripts
local char = script.Parent
local humrp = char:WaitForChild("HumanoidRootPart")
humrp.Anchored = true
local wFun = script.Warnings
what is this?