You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I am trying to write a script that will resize the player via a textbox input.
- What is the issue? Include screenshots / videos if possible!
The script I made encounters an error when I call a function with a “GetPropertyChangedSignal” trigger and I have no Idea why.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I looked extensively online but all the things I found were just caused by misspelled variables or misvalued variables. I can confirm that I have neither of these problems.
Code below:
local players = game:GetService("Players") --This service is the Players service, basically it handles things involving players
local player = game:WaitForChild("Players").LocalPlayer
print(player)
local character = player.CharacterAdded:Wait() --This is where you put the character that will do the touching
print(character)
local textbox = player.PlayerGui:WaitForChild("ScreenGui"):WaitForChild("TextBox")
local textboxtext = player.PlayerGui:WaitForChild("ScreenGui"):WaitForChild("TextBox").Text.Value
print(textbox)
local sizeHi = character.Humanoid.BodyHeightScale.Value
local sizeW = character.Humanoid.BodyWidthScale.Value
local sizeD = character.Humanoid.BodyDepthScale.Value
local sizeHe = character.Humanoid.HeadScale.Value
local sizeHiperm = character.Humanoid.BodyHeightScale.Value
local sizeWperm = character.Humanoid.BodyWidthScale.Value
local sizeDperm = character.Humanoid.BodyDepthScale.Value
local sizeHeperm = character.Humanoid.HeadScale.Value
print(sizeHiperm)
print(sizeHi)
local function changethesize()
if tonumber(textbox) ~= nil then
sizeHi.Value = sizeHiperm.Value * tonumber(textbox)
end
print(tostring(sizeHi))
print(tonumber(tostring(textbox)))
print(tostring(textbox))
print(tostring(textbox))
end
textboxtext:GetPropertyChangedSignal("Text"):Connect(changethesize)
Any help would be appreciated, as I am new to scripting. Thank you.