DevDomIV
(devdom)
September 15, 2020, 2:31pm
#1
So, I Recently Wrote A Script For My Dice Game. I’m On Chromebook So I Cant Really Test My Script. I Was Wondering If This Worked.
game.workspace.dice1
wait (5)
unanchored=true
game.startergui.setCore {
Text=The Die Has Fallen!
Font= enum.font.cartoon
Color=color3.new(225,50,255)
I’m New To This Scripting Thing So Feedback Will Be Very Helpful! Thank You!
therikald
(Tom)
September 15, 2020, 2:39pm
#2
Note: You should move this to #help-and-feedback:code-review
Your code won’t work just like that. You need to amend it to something like the following:
local Dice1 = workspace.dice1
wait(5)
Dice1.Anchored = false
Basically your syntax is all wrong, perhaps look at some code in some free models to see how Lua’s syntax works.
You should also consult the following article to see how to put notifications onto players’ screen: StarterGui | Documentation - Roblox Creator Hub
Hope this helps,
-Tom
Could you give some context on what this script is supposed to do?
DevDomIV
(devdom)
September 15, 2020, 2:40pm
#4
the script has to send a game message when the dice hits the ground
Auxicon
(Auxicon)
September 15, 2020, 2:40pm
#5
I doubt it would work. Just judging by the snippet, you’re missing syntax like " " or case-sensitive syntax like Enum.
DevDomIV
(devdom)
September 15, 2020, 2:42pm
#6
ah, thanks for the advice! I might watch some of alvinblox scripting tutorials that will probably help
DevDomIV
(devdom)
September 15, 2020, 2:42pm
#7
that will help alot, thank you!
1 Like
this is my best fix for this script because it won’t work otherwise
I also don’t know that much about lua
therikald
(Tom)
September 15, 2020, 2:44pm
#9
That script still won’t run due to capitalisations and incorrect calling of the SetCore method. As mentioned above, consult the articel that I linked to see how it all works.
DevDomIV
(devdom)
September 15, 2020, 2:44pm
#10
same here, I just started to watch some scripting tutorials and picked up some things. Thanks for the fix!
DevDomIV
(devdom)
September 15, 2020, 2:45pm
#11
ah ok. ill have to remember that to capitalize some of the functions. Thanks!
game.workspace.dice1
wait (5)
unanchored=true
game.StarterGui.setCore {
Text="The Die Has Fallen!"
Font= Enum.Font.Cartoon
Color=Color3.new(225,50,255)
You forgot the “” and all the properties has to be uppercased
sircfenner
(sircfenner)
September 15, 2020, 2:54pm
#13
I’ve moved this (back) to Scripting Support because OP does not need feedback/code review - they need basic scripting help.
@ThomasMGardiner
2 Likes