Hello everyone;
So i had a working tool for my simulator game when you clicked you got IQ, but after i put this script into players
local variable IQ
local Character = game.Players.LocalPlayer.Character
Character.Humanoid.HeadScale.Value = 1
if
IQ = 10
then set.Humanoid.HeadScale = 3
if
IQ >11 and iq <20
then set.Humanoid.HeadScale = 3
if
IQ >19 and iq <30
then set.Humanoid.HeadScale = 17
It broke it, i’m not to sure what happened
here is the tool script;
local module = {}
local replicatedStorage = game:GetService("ReplicatedStorage")
function module.Lift()
replicatedStorage.Remotes.Lift:FireServer()
end
return module
if anyone could help that would be great, thanks
also if anyone knows how the IQ script should be written help please tell me it is the main feature of mmy simulator game.
p.s i can send more info on this if you need
Hello! , Aren’t You forgetting to place the ends after each if statement ( also it would be helpful to included if there were any error in the output for future reference )
i’m not sure what your trying to do could you explain a little more? (it would be helpful)
local variable IQ = 0
local Character = game.Players.LocalPlayer.Character
local Humanoid = Character:FindFirstChild("Humanoid")
Humanoid.HeadScale.Value = 1
if Humanoid.HeadScale.Value = 3 then
IQ = 10
else if IQ >11 and iq <20
Humanoid.HeadScale.Value = 3
else if IQ >19 and iq <30 then
Humanoid.HeadScale.Value = 17
end
end
end
Ok so basically in my simulator game i want so when you " read a book" you gain IQ. And what i want is a feature that makes your head larger the more IQ you get (saying your really smart or something) The tool (book) that gives you IQ doesn’t work after i put in the head enlarge script.
(Tool script in original post) @Jaycbee05
I’m pretty sure the issue is with your if statements, but if you are going to have a normal(uniform) ratio for IQ to Head Scale, then save some time and use some math instead of if statements, (im guess you want this in a loop)
so doing something like this would work for changing the head scale in relation to the IQ while the player is reading a book ( you have to define when the player is reading a book)
local IQ= 0
local Player = game.Players.LocalPlayer
wait(1)
local Character = Player.Character
local BaseIncrement = 1 --- how much you want you want the player to gain size every .1
local ReadingBook = true
while true do --- l
wait(.1) -- waiting .1 seconds
if ReadingBook then
IQ = IQ + 1
Character.Humanoid.HeadScale.Value = IQ * BaseIncrement
end
end
I put it into the players tab in the explorer;
I made it and put it in there it wasn’t anywhere else before that, i though it was a player script as it changes the head size of the player
I’m not sure what your whole situation/goal is, but this script should probably be placed in either StarterPlayerScripts, or a tool. ( I don’t work with tools so, not sure how they work. ) The code should be inside of a local script, not a regular script. You will need to edit it accordingly.