My first time scripting!

Hi guys I am becoming a scripter and I took some parts and made my own script.
So when you touch the part your head gets big. Also you guys can use it and if u want.
If you want to use it then get a script not local script or any other scripts just a script.
Then put the script in StarterCharacterScripts.
Also make a part and name it BigHead after join the game then step on the part you named BigHead after your head will be Big.
Also one more thing if you have tips then please reply. If you have any questions don’t be afraid to ask. thank you

The script
:point_down:
local function playerTouched(Part)

local Parent = Part.Parent

if game.Players:GetPlayerFromCharacter(Parent) then

script.Parent.Humanoid.HeadScale.Value = 3

end

end

local BigHead = game.Workspace.BigHead

BigHead.Touched:Connect(playerTouched)

2 Likes

I might be wrong on this but im pretty sure that lowercase versions of methods are depricated. You should probably replace :connect() with :Connect()

Same thing with Part.parent and Part.Parent

3 Likes

what do u mean by deprecated but I tried both ways and it worked

Deprecated simply means that it does still work, but eventually it may break due to some random ROBLOX update

Just to be safe, please uppercase Connect & Parent when calling your functions

Overall, the script looks fine

I recommend replacing the capital letter in the variable “Parent” to a lower case. This is to avoid confusion.

It truly doesnt change anything like you said but it is literally just 1 character change and will prevent the skids screaming at you

ok thank you letting me know that

1 Like